PDA

View Full Version : VU+ Plugin: Force file Swap reduce RAM



WOIIFTM
22-08-11, 12:25
This plugin was posted today http://www.world-of-satellite.com/showthread.php?10452-Force-file-Swap-reduce-RAM.

Essentially it replaces the sysctl.conf file in /etc with vm.swappiness and vm.vfs_cache_pressure parameters. A quick check shows that currently the sysctl.conf contains the following:


vm.dirty_writeback_centisecs = 300
vm.dirty_background_ratio = 1
vm.dirty_ratio = 60

The plugin is based on a discussion on Linux desktops that started somewhere in 2007: http://rudd-o.com/en/linux-and-free-software/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that.

With what I know of Linux the vm.dirty parameter regulates page cache (disks) and the 'new' parameters regulate swap behavior. Wouldn't it be better to add the swap parameters to the current page cache parameters than to loose these parameters?

pooface
22-08-11, 15:16
If you were gonna do that, then yes, I would add it to the file...

However, I don't think that it would be a good idea to force the system to constantly use the swap file. This will lead to a few things (imo of course). The media in which you have the swap file becoming deteriorated, due to constantly writing the swaps. And also, the fact that since any other form of media (i.e. usb & hdd) is much slower than the RAM, it will cause more spinners and more likelyhood of the system crashing...

Personally, I'd be more inclined to add the following to the file, rather than the data included in the link shown above:


vm.swappiness=10
vm.vfs_cache_pressure=50

This will cause the system to prefer the ram rather than a swap file, but still allow use of swap file if necessary...

I haven't had a chance to test it on the system yet, but I have changed my system to use those settings, and will see whether it helps, or makes any difference at all...