Re: Ongoing 2.4 VM suckage

Daniel Phillips
2001-08-04T01:01:52Z

On Saturday 04 August 2001 00:08, Rik van Riel wrote:
> On Fri, 3 Aug 2001, Mike Black wrote:
> > Couldn't kswapd just gracefully back-off when it doesn't make any
> > progress? In my case (with ext3/raid5 and a tiobench test) kswapd
> > NEVER actually swaps anything out. It just chews CPU time.
> >
> > So...if kswapd just said "didn't make any progress...*2 last sleep" so
> > it would degrade itself.
>
> It wouldn't just degrade itself.
>
> It would also prevent other programs in the system
> from allocating memory, effectively halting anybody
> wanting to allocate memory.

It actually doesn't, Andrew Morton noticed this and I verified it for
myself. Shutting down kswapd just degrades throughput, it doesn't stop
the system. The reason for this is that alloc_pages calls
try_to_free_pages when the free lists run out and follows up by
reclaiming directly from inactive_clean.

Performance drops without kswapd because the system isn't anticipating
demand any more, but always procrastinating until memory actually runs
out then waiting on writeouts.

--
Daniel