Subject: Re: UBC status
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Eduardo E. Horvath <eeh@one-o.com>
List: tech-kern
Date: 09/25/1999 08:28:23
On Sat, 25 Sep 1999, Manuel Bouyer wrote:
> On Sat, Sep 25, 1999 at 01:26:29PM +1000, matthew green wrote:
> >
> > - add limits on how much of physmem is used for cached file data?
> >
> >
> > there should definately be limits on this...
>
> For unmodified data I'm not sure there should be one (why ?) but for
> dirty buffer there should. It's should'nt be possible for someone to eat all
> the RAM just by writing a large file.
This has been a historical problem with unified buffer cache systems. DEC
(back when it was DEC) added some sort of hard limit on the size of the
buffer cache for OSF1. I believe it was a tunable that was originally
turned off. Sun has slowly added a number of ad-hoc heuristics: never
page out a page with a use count over some number (for shared libraries),
don't replace process text pages, etc.
I personally don't like the idea of a hard limit on the buffer cache, but
something needs to be done or you may find the system start thrashing if
someone does `find / -exec fgrep foo {} \; -print'.
It would be nice if we could come up with an adaptive scheme, such as
putting unreferenced pages on the head of the freelist rather than the
tail. But I havent been able to come up with anything truly elegant yet.
=========================================================================
Eduardo Horvath eeh@one-o.com
"I need to find a pithy new quote." -- me