Comment 33 for bug 516834

Revision history for this message
Virgil Brummond (uraharakisuke153) wrote :

I did a little digging into this issue because performance on lower end machines interests me personally. I plan on getting the numbers when I can figure out how, for now I did my own testing. I actually prefer to use a value of 'vm.swappiness=100' on lower memory machines. My reasoning is that the system is going to go into swapping regardless on say 384mb of ram (the lowest I get a usable desktop on the default install). So getting less used memory already into swap can improve performance for when it is needed for a more active application. As for testing, the goal is to get Firefox up as fast as possible.

With vm.swappiness=10, the system boots and is able to log in, though attempting to start Firefox brings the system to a halt as it swaps pages back and forth. Attempting to multi-task only slows things down more.

With vm.swappiness=100, after login the system has some disk I/O while idle at the desktop, but responsiveness is not hurt much. Starting Firefox actually brings it up in around 10 seconds, and I am also able to bring up the Gnome System Monitor to view process information as well.

To reproduce these results for yourself (even on a powerful machine) you can simulate out-of-memory pressure simply by passing a temporary (reverts to default after reboot) boot parameter to the system. To test:

1. Hold shift while booting, wait until grub loads. Highlight the designated kernel to boot, and press E. Go down to the line that starts with "Linux" and press "END"
2. Append a space, followed by: mem=384m
3. (NOTE) This command will tell the kernel to ignore all but that amount of RAM. You can change the above value to anything you wish, such as mem=256m
4. Boot into the system and test your current swappiness by trying to load Firefox. The benchmark is only meaningful if the machine is under memory pressure, so lower the value of the boot parameter if the system does not seem sluggish.
5. Try another value (such as vm.swappiness=100), reboot and start again at step 1.

As I said, I plan on getting the numbers, and am currently working out a way to do so. I should make my position clear I desire no change unless performance gains are drastic. The default value of 60 is sufficient as far as I see.

It seems to me that setting the value to vm.swappiness=100 has few downsides on a system with quite sufficient ram as well. Using the option on a machine with 3gb does not make it use swap at all.