Active Topics

 


Reply
Thread Tools
Posts: 10 | Thanked: 5 times | Joined on Mar 2010
#21
Originally Posted by @SR View Post
On n900 default value for swappiness is set by /etc/init.d/rcS script somewhere in the last lines.
echo value > /proc/sys/vm/swappiness works until the next reboot. So if you want to change the value permanently you should edit it in rcS script.
How can we get hold of this script from the n900, edit it and push it back?
 
Posts: 53 | Thanked: 143 times | Joined on Dec 2009 @ Russia
#22
Originally Posted by TheSacredSoul View Post
How can we get hold of this script from the n900, edit it and push it back?
I think the easiest way would be to edit the file on n900 itself (you only need to change one number in this file). I recommend editing it using nano editor in terminal (nano /etc/init.d/rcS). vi editor may be a little hard to use for someone who haven't used it before. it is available in repository (apt-get install nano). You will also need root rights to do anything with that file (modify it on devise or replace it with the one you edited on computer) so you will need rootsh.
If you chose to edit it on computer then you should first copy it for example in MyDocs using terminal:
cp /etc/init.d/rcS /home/user/MyDocs/
Edit it and then copy it back:
cp /home/user/MyDocs/rcS /etc/init.d/rcS

Be careful not to edit something else in this script as it may result in unbootable device and you would have to reflash firmware to restore it.
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#23
Originally Posted by TheSacredSoul View Post
How can we get hold of this script from the n900, edit it and push it back?
Perhaps you can use Midnight Commander on the N900, or WinSCP over SSH to edit and save it.
 
Posts: 217 | Thanked: 20 times | Joined on Jan 2010
#24
Originally Posted by @SR View Post
I think the easiest way would be to edit the file on n900 itself (you only need to change one number in this file). I recommend editing it using nano editor in terminal (nano /etc/init.d/rcS). vi editor may be a little hard to use for someone who haven't used it before. it is available in repository (apt-get install nano). You will also need root rights to do anything with that file (modify it on devise or replace it with the one you edited on computer) so you will need rootsh.
If you chose to edit it on computer then you should first copy it for example in MyDocs using terminal:
cp /etc/init.d/rcS /home/user/MyDocs/
Edit it and then copy it back:
cp /home/user/MyDocs/rcS /etc/init.d/rcS

Be careful not to edit something else in this script as it may result in unbootable device and you would have to reflash firmware to restore it.
hi
if you move rcS around, make sure it end up with exec permitions.

ls -al /etc/init.d/rcS
will show rwxr-xr-x
(look at the 3 x)

will it not work inside MyDocs, but if it loses that permitions, you can set it back with: chmod +x /etc/init.d/rcS

you can check it with: ls -al /etc/init.d/rcS
 
Posts: 10 | Thanked: 5 times | Joined on Mar 2010
#25
Hmm. I decided to use midnight commander. easier then expected. I browsed to the folder, tapped edit, searched for "swappiness", changed the 100 to 30, saved it, and rebooted.

cat /proc/sys/vm/swappiness shows 30.

Lets see how much of an improvement there is.
 

The Following User Says Thank You to TheSacredSoul For This Useful Post:
Posts: 193 | Thanked: 92 times | Joined on May 2010 @ galveston, tx
#26
I tried this
echo 0 > /proc/sys/vm/page-cluster

in vim /etc/init.d/rcS line 264.

guided by this blog http://www.sabi.co.uk/blog/anno05-3rd.html#050923

Seemed to reduce the pressure on VM usage.
 

The Following 3 Users Say Thank You to noipv4 For This Useful Post:
Posts: 40 | Thanked: 20 times | Joined on Jan 2010 @ Sheffield, England.
#27
Hey guys i thought ill bring this thread back to life.. i have been using swappiness to 30 past few days..

I dont see any ill effects at all.. and performance seems to have improved a lot .. and battery life by a bit if im not imagining things

am running 750 mhz clocked kernel..
__________________
I <3 my N900..!
 

The Following User Says Thank You to hackfanatic For This Useful Post:
Posts: 2,829 | Thanked: 1,459 times | Joined on Dec 2009 @ Finland
#28
I have also tested swappiness 30 and page-cluster 0. I'm pretty sure that responsivness has been better. I would be highly interested on possible side-effects on these changes.

btw.
is it possible to unload preloaded modest and browserd?

.edit
I have also seen some nice value tweaks. Have you tried them and what were the results?

Last edited by slender; 2010-08-30 at 21:41.
 

The Following User Says Thank You to slender For This Useful Post:
Posts: 486 | Thanked: 251 times | Joined on Oct 2009
#29
Originally Posted by pycage View Post
I have been running my N900 with swappiness 30 for some weeks without any ill side-effect. But it seems that battery-life and device responsiveness have both noticably improved.

BTW, on Diablo OS, the default swappiness value was 1. I'm almost certain that a default value of 100 on the N900 is not the optimal setting for this device at all.
In March, you said that you were using 1.
http://talk.maemo.org/showthread.php?t=47173&page=2

Did you decide 30 is better?
__________________
The Mini-USB plug is an improvement over both the Type B plug and the Micro-B plug.
 
Posts: 14 | Thanked: 16 times | Joined on Oct 2008
#30
I just switched swappiness to 30,... much faster in starting and stopping applications,... just more responsive overall.

To give a comparison, Ubuntu defaults to a swapiness value of 60. On some server systems, where a large program is going to remain in memory while other tasks are being performed, a swappiness value of 100 can be advisable, but 60 is the sweet spot for desktop/server hybrid use (which is why they use that). For most desktop use, with a decent amount of RAM, you want to have a swappiness setting of 10 on Ubuntu systems...

The trade off is having enough virtual memory for keeping application that are idle running and happy, versus having too much being pushed to virtual memory. With flash memory, it has limited read-write cycles, even with modern level wearing stuff going on, so lower swappiness will help the system's flash memory lifespan.

For the N900, because it has flash storage, a setting of 60 is probably too much. And since flash memory's faster than disk, a 30 is proabably about right for the N900.

Setting it too low (like a 0 or a 1) might possibly effect some daemons (Like phone related stuff) running in the background that we might not be aware of. But overall, I agree that a 100 is way out of line. Running at 30 makes it seem like a whole new device.
 

The Following 9 Users Say Thank You to JaseP For This Useful Post:
Reply

Tags
battery


 
Forum Jump


All times are GMT. The time now is 19:12.