[SATLUG] Swappiness in Ubuntu
horned0wl93 at gmail.com
Fri Apr 25 16:09:46 CDT 2008
I have some rather interesting questions regarding RAM swapping in
Ubuntu or other Debian-based Linux OS. I've just increased my Acer
laptop's RAM from 1GB to 2.5GB by replacing a 512MB SODIMM with a 2GB
SODIMM (1.8GHz CPU). BIOS and system both acknowledge the increase, and
my system now runs somewhat faster. But, as well as faster, I'm looking
for "better." My questions relate to optimizing performance based on
this new increase. I've seen/read a lot of debate on modifying the
"swappiness" value, the percentage of RAM content swapped to disk at any
given moment. My current setup looks like this:
> root at xxxx:/# free -m
> total used free shared
> buffers cached
> Mem: 2470 809 1660 0
> 25 367 (misnomer: 32MB shared to video)
> -/+ buffers/cache: 416 2054
> Swap: 721 0 721
> root at xxxx:/# cat /proc/sys/vm/swappiness
> root at xxxx:/#
1. Is there a need to change swappiness based on increased RAM? Note:
Changing my swappiness (values ~ 0-100) via sysctrl.conf to "1" seemed
to have an inverse effect on CPU use, increasing cycles tremendously,
and maxing it out more often than Ubuntu's default setting of "60."
2. If I do need to change swappiness, what's a good value? Why? Why
not? What's gained? What's lost?
3. Are there any other values besides or instead of swappiness that'll
increase or optimize performance? How would these or other changes
affect system stability? Hardware performance? Hardware life-cycle?
Any commentary most welcome.
More information about the SATLUG