Thread: Boost N900! :)
View Single Post
Posts: 701 | Thanked: 585 times | Joined on Sep 2010 @ London, England
#296
Originally Posted by SavageD View Post
don't want to go into techincallities and all cause I don't want to make a long post.

echo 6 > /proc/sys/vm/page-cluster

I chose this value simply because having done some research I found that increasing the value actually made their computers faster. The original value was "5" which I thought was good enough though just to make things slightly better I increased it to "6" any higher and it would dig into battery life as it makes swap more aggressive.
What research did you do into this? Was it just changing and observing that it made the computers you tested faster, or was there more to it than that?

While investigating the function of each of the settings that swappolube changed, I had a hard time finding much information on this one, so I ended up digging around in the kernel source code, and there was a comment saying that even though there are performance benefits from larger values for systems with larger amounts of RAM there were negative effects from setting this value above 3, so the default for a vanilla kernel is 3 (or 2 on very low memory systems), however there was no indication as to what the negative effects were in the comments. This value is used both for the number of swap pages to read ahead, as well as the number of swap pages to write in one go, it also uses the number in the 2^n fashion, so a value of 6 indicates 64 pages. Higher values are mostly of use when swap is on a hard disk drive where seek time is an issue, so it is beneficial to group read/writes into larger chunks to reduce the amount of time spent seeking. On an SSD seek times are less of an issue, so I would expect less of a benefit from high values, I would also think that lower values would tend to reduce lagginess when writing to swap since it will be doing it in smaller chunks. But to be honest I don't truly know how this affects responsiveness on the N900 and what is the best way to go.

Personally I decided to heed the warning and set it to 3, while swappolube sets it to 0 (IIRC).