Re: Thrashing WITHOUT swap.

From: Helge Hafting (
Date: Mon Jun 25 2001 - 04:21:57 EST

Maciej Zenczykowski wrote:
> Now my question is how can it be
> thrashing with swap explicitly turned off?

Easy. Linux throws executables out from memory because they _can_
be fetched again from disk. Yes - this definitely gives trashing
if you loose almost all your executables this way.

> [oh just to make stuff even
> funnier netscape is at nice -19 (i.e. lower priority)]

That makes no difference. nice'ing netscape means it use
less _cpu when other things want cpu_, it can still over-spend memory!

> top gives me:
> mem: 62144k av, 61180k used, 956k free, 0k shrd, 76 buff, 2636 cached
> swap: 0k av, 0k used, 0k free [as expected]

File i/o becomes a pain with so few buffers and cache pages left, and
then your file i/o and the executable fetching competes for
the disk. No wonder it got slow, and laptop disks aren't usually
that fast either...
> So my basic question is what can I do to fix this?
Looks like you were 3M away from running completely out of memory.
Turn on that swap partition you mentioned, your machine will degrade
much more gracefully. It'll keep more cache around and be able
to get rid of unused data instead of just dropping executables.
Some of the code is used a lot after all.

If it still is too slow - add RAM or run fewer/smaller apps.
Opera is a low-memory alternative to netscape. Avoiding
gnome/kde apps when plain X apps are available is also a good idea
when you're short on memory. Using low resolution and low-color
modes might help a little if you do lot of graphics. But then
you might not want that.

Helge Hafting
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 30 2001 - 21:00:11 EST