Re: memory management and the status of

Chris Wedgwood (chris@cybernet.co.nz)
Mon, 7 Sep 1998 11:44:44 +1200


On Sun, Sep 06, 1998 at 03:50:50PM +0200, Hans Eric wrote:

> I thought linux already did this. It would be easy to refine the
> swap algorithms to seek out dirty pages that has not been modified
> for a while (lets say 2 minutes) and write them out to swap.

Not modified isn't good enough, they have to be untouched, otherwise
you'll start killing large databases which maintain large local
caches and for many types or queries are RO. A example of this might
be bind with lots of local authoritive domains.

> Thus making them non dirty. Lets say this is done every 2 minutes
> and only if the kernel has the idle cpu and disk io time, we dont
> want to waste cpu and disk io that could have been used better. So
> an idle linux box will then have a lots of non dirty pages that can
> be used immidiately without any disk io for swapping if the need
> for lots of memory suddenly comes up.

Yes... and since many machines spend lots of time idle and many
long-termed processes have many pages that pretty much aren't doing
anything, we may as well use them for buffer-cache or whatever when
the load does pick up.

However, think more about this, it might be too hard or impossible to
tune this for everyone.

Consider the case of a large Oracle database that is used between 9am
and 5pm. After 5pm, its fairly quiet, and the kernel starts migrating
pages to disk... come the next morning, the database might initially
be fairly sluggish as the kernel will have to page in plenty when the
database gets busy....

-cw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/faq.html