Re: minimizing swap usage

From: M. Edward (Ed) Borasky (znmeb@aracnet.com)
Date: Thu Dec 20 2001 - 09:05:44 EST


On Thu, 20 Dec 2001, christian e wrote:

> Hi,all
>
> Can someone give me a pointer to how I can avoid somethign like this:
>
> foo@bar]$ free -m
> total used free shared buffers cached
> Mem: 249 245 4 0 6 136
> -/+ buffers/cache: 102 147
> Swap: 243 89 153
>
> What's with all the caching when my apps crawl because it's swapping so
> much ? I've tried to adjust /proc/vm/kswapd parameters but that doesn't
> seem to help..I'd like to postpone the swapping until its almost out of
> physical memory..

This may seem counterintuitive, but postponing swapping / cache flushing
to disk till the last possible moment is counterproductive. It's a
little like procrastination in the time management world -- when the
time finally comes when you *have* to flush stuff out to disk, your poor
daemons / kernel threads go catatonic trying to keep up, and you end up
both CPU-bound and I/O bound. It is far better to have enough free
memory available to satisfy the demand for pages, even if that means
*raising* the watermarks, *more* swapping and smaller page caches.

--
M. Edward Borasky

znmeb@borasky-research.net http://www.borasky-research.net

When puns are outlawed, only inlaws will have gnus.

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



This archive was generated by hypermail 2b29 : Sun Dec 23 2001 - 21:00:22 EST