Kernel VM: System Thrashing Revisisted

Paul M. Bucalo ubuntuser at pmbservices.com
Thu Jun 16 16:51:00 UTC 2005


For the first time since making the adjustment to 'vm.swappiness', I
encountered the dirty-page-writing-to-disk "thrashing" that I wrote
about earlier on. Therefore, only changing the value of 'swappiness' to
"90" delayed the inevitable, but never solved the original problem. Most
likely, the answer will be a combination of kernel/vm tweaks, not just
one. 

Research on 'vm.dirty_ratio' and 'vm.dirty_background_ratio' settings
have lead me to change these values from "10" and "40" to "1" and "10",
respectively. This *should* cause the kernel to request dirty pages to
be held for a shorter time and written to disk more often, which would
benefit a slower system like mine with nominal memory. More frequent
writings (and maybe a little shorter time held) will hopefully minimize
the system freezing without too much of a performance hit.

It's only been a couple of hours of heavy usage under these settings,
but the system seems to be as snappy as ever and I have noticed less CPU
usage, better use of RAM memory and about half of my swap space in use.
My short-term opinion is that I may be onto the solution. All of this is
based on an AMD K6-2/500 MHz box, 256 MB RAM, 40 GB HD.

I would welcome any constructive comments on this, especially from
anyone who is experimenting, or has experimented, with these values for
older hardware. If I come to any definitive conclusions, I will make a
point to publish the information, appropriately.

FYI,

Paul





More information about the ubuntu-users mailing list