maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   How to set swappiness? (https://talk.maemo.org/showthread.php?t=48966)

TheSacredSoul 2010-04-01 14:20

How to set swappiness?
 
I see people discussing changing swappiness but what is the exact way to go about doing it and making it stick at every reboot? Also, I heard you can run swap from the microsd to get a more responsive device?

My phone comes down to a crawl after less then a day of usage. I normally have to repeatedly tap conversations for it to open after a minute so im looking at anything to improve the responsiveness. Thanks for your help!

ossipena 2010-04-01 14:22

Re: How to set swappiness?
 
swappiness?!?!?

are you referring to swap partition maybe?

what unstable stuff have you installed to your device?

ToJa92 2010-04-01 14:23

Re: How to set swappiness?
 
Quote:

Originally Posted by ossipena (Post 591410)
swappiness?!?!?

are you referring to swap partition maybe?

what unstable stuff have you installed to your device?

Read this, there are some info about swappiness: http://kerneltrap.org/node/3000
I suppose Wikipedia also got some info on that subject.

TheSacredSoul 2010-04-01 14:29

Re: How to set swappiness?
 
Thanks for the link... I roughly know whats swappiness after using Andriod with custom ROM's for over a year. I just dont know how to set it on N900. And google isnt much too :(

ossipena 2010-04-01 14:31

Re: How to set swappiness?
 
I'd leave it be, it probably has already been optimized.

hqh 2010-04-01 14:36

Re: How to set swappiness?
 
Quote:

Originally Posted by ossipena (Post 591418)
I'd leave it be, it probably has already been optimized.

Yes, the problem lies somewhere else since slowing down to a crawl in a day isn't normal behavior.

Rob1n 2010-04-01 14:38

Re: How to set swappiness?
 
Quote:

Originally Posted by TheSacredSoul (Post 591417)
Thanks for the link... I roughly know whats swappiness after using Andriod with custom ROM's for over a year. I just dont know how to set it on N900. And google isnt much too :(

Just echo a value to /proc/sys/vm/swappiness (as root). There doesn't appear to be sysctl on the N900, so persisting the changes would be a bit trickier.

wheelybird 2010-04-01 14:43

Re: How to set swappiness?
 
It's /proc/sys/vm/swappiness. As root:
echo "50" > swappiness
will change it, though this won't survive a reboot.
The default is 100, which is the swappiest. You could try lowering it to, say, 50.

You can add a swap partition to your SD card by editing the partitions and adding a Linux swap partition to it (type 82).
For example, add a swap partition of 1GB to the SD. Search the internet for fdisk, swapon, swapoff and mkswap to teach you what to do. You'd turn the SD swap on and the internal swap off.

Please note: this is for information only. Do what you like with your device, but at the risk of making it not work at all. Personally I'd recommend keeping it set up as it is at the moment.

memoryguy 2010-04-01 14:44

Re: How to set swappiness?
 
Quote:

Originally Posted by Rob1n (Post 591428)
Just echo a value to /proc/sys/vm/swappiness (as root). There doesn't appear to be sysctl on the N900, so persisting the changes would be a bit trickier.

I updated my swappiness a couple months ago... I think I found a spot somewhere in the init scripts... if I recall correctly there was a comment saying to put updates to /proc stuff there... I think... I forget now and don't have the device handy.

I think it defaults to swapiness 100, which I think means "go ahead and swap as much as you want" ... which didn't seem right to me so I changed it to 0... not sure if I've noticed much difference... I should change it back again and see...

TheSacredSoul 2010-04-01 14:54

Re: How to set swappiness?
 
From what I've read, the sweet spot is 60... I just set mine to 60. Shall give it a try. Thanks for your help. And for anyone who wants to know the command is

echo 60 /proc/sys/vm/swappiness


All times are GMT. The time now is 23:03.

vBulletin® Version 3.8.8