Re: updated dcache/inode management for 2.1.61

Bill Hawes (whawes@star.net)
Sun, 02 Nov 1997 14:45:20 -0500


Martin von Loewis wrote:
> Very interesting indeed.
>
> > Operation 2.1.61 2.0.31
> > Grep 2.1.60 sources 24.81 24.85
> > 07.75 06.81
> > 05.15 03.29
>
> Any idea why the second grep is slower in 2.1.61? How much memory was
> assigned to the disk cache and the directory cache in both cases?

It's very difficult to say exactly why operations are slower or faster,
as 2.1.61 and 2.0.31 are so different in their inode management. To make
the tests as fair as possible, I set max-inodes to 4096 for both, and
ran the script from a fresh boot on a 32M system. I put a 6 sec pause
in between operations to let the sync operation run.

The main difference is that 2.0.xx has no explicit mechanism to free
inodes in response to memory needs, which makes it slower to adjust when
changing to another source tree, but quite good at keeping the inodes
used last time. In 2.1.61 I release dentries in response to system
memory needs, but have to play tricks to keep from cannibalizing
dentries at the front edge of the sweep. I've been playing with the
tuning parameters to try to get it working well in this respect.

If you want to play with it, all of the policy is contained in the
select_dcache() routine.

Regards,
Bill