Reply
Thread Tools
Posts: 515 | Thanked: 266 times | Joined on Nov 2009 @ Oelsted, Denmark
#51
Originally Posted by matthew maude View Post
its easier to use vi editor for this, run

sudo gainroot

vi /etc/init.d/rcS

scroll down to 263/281

press the letter i - don't press enter after

it looks like this
echo 100 > /proc/sys/vm/swappiness

use the arrows to move the cursor and change the value to 30 or whatever you want - keep it above 30 tho

then press the onscreen 'esc' button

then type this

:wq

then hit enter
Or move the curser till it's over the 1 in 100 and press rw (replace word), enter 30, then esc, and then :wq

There's a reason for creating a new event.d script though (I also edited rcS at first).
__________________
Christian Wilken - tux-POWER.dk!
... May the Source be with You ...

Last edited by DrWilken; 2010-09-22 at 09:49.
 

The Following User Says Thank You to DrWilken For This Useful Post:
Posts: 166 | Thanked: 30 times | Joined on Apr 2010 @ Halifax, UK
#52
Originally Posted by DrWilken View Post
Or move the curser till it's over the 1 in 100 and press r (replace), enter 30, then esc, and then :wq

There's a reason for creating a new event.d script though (I also edited rcS at first).
ah, didn't know that
i'm so new to linux that i only found out about vi a few days ago whilst trying to add aliases to root/.profile
and i only found out cos i overwrote the damn file and lost the ability to run any apt command or do a reboot
learning something new every day tho
 

The Following User Says Thank You to matthew maude For This Useful Post:
Posts: 515 | Thanked: 266 times | Joined on Nov 2009 @ Oelsted, Denmark
#53
Google for Vi Cheat Sheet...

Oh, and have a nice journey...
__________________
Christian Wilken - tux-POWER.dk!
... May the Source be with You ...

Last edited by DrWilken; 2010-09-11 at 08:48.
 
Posts: 19 | Thanked: 6 times | Joined on May 2010 @ Brasil
#54
what about that:

HTML Code:
# my rcS.e fix

start on started rcS-late

script
       echo 30 > /proc/sys/vm/swappiness
       echo 0 > /proc/sys/vm/page-cluster
       echo 1 > /proc/sys/vm/laptop_mode
       echo 1 > /proc/sys/vm/oom_kill_allocating_task
       echo 0 > /proc/sys/vm/dirty_expire_centisecs
       echo 0 > /proc/sys/vm/dirty_writeback_centisecs
       echo 60 > /proc/sys/vm/dirty_background_ratio
       echo 95 > /proc/sys/vm/dirty_ratio
       echo 0 > /proc/sys/net/ipv4/tcp_timestamps
       echo 1 > /proc/sys/net/ipv4/tcp_no_metrics_save
end script
 

The Following 4 Users Say Thank You to kaze.daniel For This Useful Post:
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#55
Originally Posted by kaze.daniel View Post
what about that:

HTML Code:
# my rcS.e fix

start on started rcS-late

script
       echo 30 > /proc/sys/vm/swappiness
       echo 0 > /proc/sys/vm/page-cluster
       echo 1 > /proc/sys/vm/laptop_mode
       echo 1 > /proc/sys/vm/oom_kill_allocating_task
       echo 0 > /proc/sys/vm/dirty_expire_centisecs
       echo 0 > /proc/sys/vm/dirty_writeback_centisecs
       echo 60 > /proc/sys/vm/dirty_background_ratio
       echo 95 > /proc/sys/vm/dirty_ratio
       echo 0 > /proc/sys/net/ipv4/tcp_timestamps
       echo 1 > /proc/sys/net/ipv4/tcp_no_metrics_save
end script
Just add first 4 lines to be in sync with coding standards:

Code:
description "it is my own N900 tuning"
author "YourName"

console output
instead of ugly line started from # (sorry for that). And please - enclose any numeric value before '>' sign into double-quotes like

echo "95" > /proc/sys/vm/dirty_ratio

It could not expose you to very common bug - the sequence like '95>' without space has a special meaning in shell.

Note: I didn't evaluate the effect of that "echo" commands.
 

The Following 2 Users Say Thank You to egoshin For This Useful Post:
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#56
For an explanation of these settings and values see http://www.knownokia.ca/2010/08/n900...-and-more.html

FWIW, I'm gonna try them out next days.
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 

The Following 2 Users Say Thank You to allnameswereout For This Useful Post:
Posts: 220 | Thanked: 19 times | Joined on Jun 2006
#57
I have a long time ago made a script that sets swappiness to 100 it is on the garage it is called "seatbelt" install the script will set swappines at startup.
whether this is a good thing to do i do not know. It worked great on the 770
 

The Following User Says Thank You to smackpotato For This Useful Post:
Posts: 436 | Thanked: 406 times | Joined on Jan 2010
#58
To save users the time of searching, It's here ...

Using the seat belts read me file, I'm guessing we have to do this?

As root.
Copy the script to /etc/init.d
Change script mode to executable
Create this symbolic link using this command:

ln -s /etc/init.d/<Script Name> /etc/rc2.d/S80seatbelt"

Reboot

And

To reverse changes, remove the link and script...

So basically all we need to do is create a sym link to a script for it to run on start up?

Last edited by SavageD; 2010-09-14 at 02:50.
 
allnameswereout's Avatar
Posts: 3,397 | Thanked: 1,212 times | Joined on Jul 2008 @ Netherlands
#59
Originally Posted by SavageD View Post
To save users the time of searching, It's here ...

Using the seat belts read me file, I'm guessing we have to do this?

As root.
Copy the script to /etc/init.d
Change script mode to executable
Create this symbolic link using this command:

ln -s /etc/init.d/<Script Name> /etc/rc2.d/S80seatbelt"

Reboot

And

To reverse changes, remove the link and script...

So basically all we need to do is create a sym link to a script for it to run on start up?
Ehm...

# swappiness can be set from 1 to 100
echo 100 > /proc/sys/vm/swappiness
echo 2 > /proc/sys/vm/overcommit_memory
echo 40 > /proc/sys/vm/overcommit_ratio


No need for fugly sysvinit junk.

On Maemo 5 just put in /etc/event.d/tuning

Code:
description "N900 tuning"
author "VA"

console output

start on started rcS-late

script
       echo "30" > /proc/sys/vm/swappiness
       echo "0" > /proc/sys/vm/page-cluster
       echo "1" > /proc/sys/vm/laptop_mode
       echo "1" > /proc/sys/vm/oom_kill_allocating_task
       echo "0" > /proc/sys/vm/dirty_expire_centisecs
       echo "0" > /proc/sys/vm/dirty_writeback_centisecs
       echo "60" > /proc/sys/vm/dirty_background_ratio
       echo "95" > /proc/sys/vm/dirty_ratio
       echo "0" > /proc/sys/net/ipv4/tcp_timestamps
       echo "1" > /proc/sys/net/ipv4/tcp_no_metrics_save
end script
For explanation of each of these settings see URL in my previous post.
__________________
Goosfraba! All text written by allnameswereout is public domain unless stated otherwise. Thank you for sharing your output!
 

The Following 3 Users Say Thank You to allnameswereout For This Useful Post:
Posts: 20 | Thanked: 13 times | Joined on Sep 2010
#60
Originally Posted by kaze.daniel View Post
what about that:

HTML Code:
# my rcS.e fix

start on started rcS-late

script
       echo 30 > /proc/sys/vm/swappiness
       echo 0 > /proc/sys/vm/page-cluster
       echo 1 > /proc/sys/vm/laptop_mode
       echo 1 > /proc/sys/vm/oom_kill_allocating_task
       echo 0 > /proc/sys/vm/dirty_expire_centisecs
       echo 0 > /proc/sys/vm/dirty_writeback_centisecs
       echo 60 > /proc/sys/vm/dirty_background_ratio
       echo 95 > /proc/sys/vm/dirty_ratio
       echo 0 > /proc/sys/net/ipv4/tcp_timestamps
       echo 1 > /proc/sys/net/ipv4/tcp_no_metrics_save
end script
I've switched to this script from the 15 swappiness I had previously and I noticed a significant speed boost! Thanks!
 
Reply

Tags
battery


 
Forum Jump


All times are GMT. The time now is 10:42.