Re: Kernel 2.4.16 & Heavy I/O

From: Rik van Riel (riel@conectiva.com.br)
Date: Thu Dec 06 2001 - 14:56:22 EST


On Thu, 6 Dec 2001, Mike Galbraith wrote:
> On Thu, 6 Dec 2001, Rik van Riel wrote:
> > On Thu, 6 Dec 2001, Roy Sigurd Karlsbakk wrote:
> >
> > > Is it really neccecary? Free memory's a waste! The cache will be
> > > discarded the moment an application needs the memory.
> >
> > That's not the case with use-once ...
>
> A little more verbosity please?

Once a page is used twice, it's not a candidate for eviction
until (most of) the use-once pages are gone.

This means that if you have these 40 MB of used-twice-but-never-again
buffer cache memory, this memory will never be evicted until other
pages get promoted from use-once to active.

Now say you have 200 MB of RAM, 40 MB of which are the above
buffer cache pages. Now you start a program which needs 170
MB of RAM.

This 170 MB program touches each page once before starting
at the front again, which means all its pages are used once
before getting evicted ... and they never get promoted to
active pages so the 40 MB of no longer used buffer cache
never gets evicted.

Use-once has this property in principle and the warnings have
gone out since around 2.4.8-pre4, but it's in 2.4 now so you're
stuck with it.

cheers,

Rik

-- 
DMCA, SSSCA, W3C?  Who cares?  http://thefreeworld.net/

http://www.surriel.com/ http://distro.conectiva.com/

- 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 : Fri Dec 07 2001 - 21:00:35 EST