[olug] Tweaking swapping in 2.6.X kernels...

Ben Dinger ben at mac-geek.com
Tue Sep 28 18:52:13 UTC 2004


In general, I've noticed redhat-based systems have been far greater memory hogs/swap happy than other distros.  That is, redhat-based systems with stock redhat kernels.  

Also, you may want to check out how much RAM vmware is using.  Lots of times it likes to really eat as much RAM as you will give it. 

But that is great info in general.  With the amount of RAM that current systems are shipping with, I'm surprised the kernel developers are increasing system swap. 

Of note, I noticed the same on a SuSE 9.1 box that's running the stock 2.6.x kernel. 

On Tue, Sep 28, 2004 at 01:17:13PM -0500, Daniel Linder wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> (Hope this helps others who seem to have doggy machines...  -- Dan)
> 
> My workstation is a Compaq P4-3.06GHz w/1GB RAM and a 60GBB 7200 HDD
> running Fedora Core FC3 Test 1 (kernel 2.6.8-1.540smp) -- in otherwords,
> plenty of power for most workloads.
> 
> When I would start some large programs running (Firefox, X11, xmms, and
> two instances of VMWare), there would be times that the performance of the
> system would go down the tubes and become nearly intolerable to use.  I
> noticed the HDD light was on solid during these instances, and the vmstat
> output was showing that the swapin/swapout counters were high and the
> "Waiting for IO" was through the roof (85%+).
> 
> I stumbled across some discussion of the new "swappiness" factor the new
> kernels support via the "/proc" filesystem.  The number that my system was
> set to initially was "60" (it can range from 0 to 100) -- the lower the
> number the more agressively the system will try to hold things in RAM
> before swapping them out.  I lowered this to "25" and the performance is
> extremely responsive now.  You can do this by executing the following as
> root:
> echo 25 > /proc/sys/vm/swappiness
> (You will have to do this each time you reboot, so add the following line
> to your /etc/rc.local once you find a value you like.)
> 
> These numbers aren't a science yet, so my value might not work in your
> situation, and could easily be a bad value when my system gets an
> newer/different kernel...YMMV.
> 
> Good luck, hope this helps!
> 
> Dan
> 
> 
> - - - - -
> "I do not fear computer,
> I fear the lack of them."
>  -- Isaac Asimov
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
> 
> iD8DBQFBWaqpNiBNyqUzGb8RAmilAKCCflqncyNKDmBDZKzOoCe4dUIRQQCdGaUb
> 0Co1dMDUU4Wu0yEBXHJLgto=
> =F+fe
> -----END PGP SIGNATURE-----
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug

-- 
Ben Dinger
ben at mac-geek.com
"The Pope?  How many divisions has he got?" --Josef Stalin



More information about the OLUG mailing list