Re: More info: 2.1.108 page cache performance on low memory

Rik van Riel
1998-07-24T22:12:58Z

On 24 Jul 1998, Zlatko Calusic wrote:

> > There's also a 'soft limit', or borrow percentage. Ultimately
> > the minimum and maximum percentages should be 0 and 100 %
> > respectively.
>
> Could you elaborate on "borrow" percentage? I have some trouble
> understanding what that could be.

It's an idea I stole from Digital Unix :)

Basically, the cache is allowed to grow boundless, but is
reclaimed until it reaches the borrow percentage when
memory is short.

The philosophy behind is that caching the disk doesn't make
much sense beyond a certain point.

It's a primitive idea, but it seems to have saved Andrea's
machine quite well (with the additional patch).

I admit your patch (multiple aging) should work even better,
but in order to do that, we probably want to make it auto-tuning
on the borrow percentage:

- if page_cache_size > borrow + 5% --> add aging loop
- if loads_of_disk_io and almost thrashing [*] --> remove aging loop

[*] this thrashing can be measured by testing the cache hit/mis
rate; if it falls below (say) 50% we could consider thrashing.

(50% should be a good rate for an aging cache, and the amount
of loops is trimmed quickly enough when we grow anyway. This
mechanism could make a nice somewhat adjusting trimming
mechanism. Expect a patch soon...)

Rik.
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+