Kernel (VM) swap problem in Hoary

Tim Long timwarm at
Mon Jun 6 00:44:43 UTC 2005

My experiences with smaller memory system:

I have been recently fiddling with a box with older AMD  350 MHz-128
MB ram seeing if it is usable ubuntu. Installing kubuntu and reducing
all the display settings to a minimal made the desktop very snappy and

With the default swappiness setting (60) open office is unusable. Once is loaded and the system stops thrashing the problem is that
once you start entering or editing text the app will constantly pause
for a second or two. If I set swappiness to 0 or 5 then the behaviour
would stop so it appears that the default swappiness value is causing
the system to keep trying to evict active memory pages to swap.

I haven't tried high swappiness (90). It should make the situation worse (?)

I have also discovered that the system has bigger problems with the
cache/buffer settings. It seems to limit apps to 40-60 MB of RAM,
anything above that seems to be dumped/held to swap. Caching RAM never
seems to drop below 60 MB which is strange (commonly 70 MB+| of 126
devoted to OS usage?). I can't seem to find any documentation on how
to change this. Any ideas?

Tim Long.

On 6/6/05, Paul M. Bucalo <ubuntuser at> wrote:
> On Tue, 2005-05-31 at 21:44 +0100, James Wilkinson wrote:
> > Paul M. Bucalo wrote:
> > > I've had this same problem in FC 3 and couldn't (well, really wasn't
> > > smart enough) to resolve it: kernel wastes up to 98% of available RAM to
> > > cache and hold dirty pages too long while memory is desperately needed
> > > for applications. Then, extensive swap-thrashing that leaves the system
> > > nearly useless for up to 30 minutes. It seems to be more an issue on the
> > > desktop with 2.6 kernels.
> <..>
> > You've played with the swappiness setting (in /proc/sys/vm)? You
> > probably want to decrease that. Googling for it turns up
> > as the first link.
> I've had nearly a week to play with two values that relate to
> corresponding theories on what's the best value to use. Here are my
> results based on changing the vm.swappiness values to reflect these
> opinions:
> Value '10'
> - Performance increased noticeably.
> - I was able to reproduce system uselessness while running Mozilla
> Firefox and Evolution, and in the midst of creating a long email
> message. Forced to ALT-CTRL-BKSPC to recover control after waiting 20
> minutes.
> - Doesn't happen unless I have been working in such a condition for
> quite a few minutes.
> Value '90'
> - Performance decreased noticeably, but not so that I felt uncomfortable
> with it.
> - Have not been able to reproduce system uselessness under above
> situation.
> - Tested having several 'heavy' apps running, including the above and
> Pan, GQView, Xine and OpenOffice2. Couldn't put system into uselessness
> mode.
> My take on this is:
> 1. Use lower values for faster systems with amble RAM memory present.
> Since my system has 256 MB RAM, I would suggest that 'amble' is 512+ MB
> RAM.
> - The more RAM, the more dirty pages that can be cached (and for a
> longer period) before writing to disk.
> - The faster the processor, the less time spent thrashing the system and
> possibly with lesser uselessness as a result.
> 2. Use higher values for older, slower systems that are running less
> than ample RAM and processor speed.
> - 256 MB RAM worked well with a vm.swappiness value of '90'. I imagine I
> would set it to '10' if I had only 128 MB RAM.
> - The slower processor works more often, but less intensely, leaving the
> system always usable. Even when dirty pages were being written at a time
> of greatest activity level, I was still able to continue being
> productive.
> Taking into consideration the lack of agreement on what's the best value
> all around, I feel that one needs to experiment based on the age and
> performance level of their individual systems. Old timers are most
> likely going to have to contend will loss of speed on the desktop to
> avoid being interrupted when the system decides its time to get caught
> up. Added RAM will help in any case, but what can't be avoided is the
> lack of 'horsepower' an older processor has when writing so much back to
> the disk. Somewhere in between optimum and practical is the best result
> for each of us. An obvious statement, I know, but still the challenge
> from what I have read and experienced personally.
> How's that for a vaguely definitive report? ;0)
> Paul
> --
> ubuntu-users mailing list
> ubuntu-users at

More information about the ubuntu-users mailing list