Re: Kernel 2.4.16 & Heavy I/O

Rik van Riel (riel@conectiva.com.br)
Thu, 6 Dec 2001 17:56:22 -0200 (BRST)


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/