Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jan 2002 21:28:39 +0100
From:      Stefan Esser <se@freebsd.org>
To:        freebsd-audit@FreeBSD.org
Cc:        Peter Jeremy <peter.jeremy@alcatel.com.au>, Stefan Esser <se@freebsd.org>
Subject:   Re: Re: systat(1) bugs
Message-ID:  <20020122202839.GA73384@StefanEsser.FreeBSD.org>
In-Reply-To: <20020123065359.P72285@gsmx07.alcatel.com.au>
References:  <20020121093532.D72285@gsmx07.alcatel.com.au> <20020121000458.GA95702@StefanEsser.FreeBSD.org> <20020123065359.P72285@gsmx07.alcatel.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-01-23 06:53 +1100, Peter Jeremy <peter.jeremy@alcatel.com.au> wrote:
> On 2002-Jan-21 01:04:58 +0100, Stefan Esser <se@FreeBSD.org> wrote:
> >The namei Dir-cache % display is wrong, since it calculates the
> >percentage based on the total number of requests, not based on 
> >the number of Name-cache misses. (I.e. with 1000 calls to namei,
> >950 of them name-cache hits, 30 dir-cache hits, the percentage 
> >will be calculated as 3% (30/1000), while it actually should come
> >out as 60% (30/(1000-950)) ...)
> 
> I'm not sure this is as clear-cut.  I believe the current behaviour is
> more correct: To use your numbers, of the 1000 namei() calls, 95% were
> found in the name-cache and 3% were found in the dir-cache, with the
> remaining 2% requiring physical reads.  This is consistent with my
> reading on systat(1).  I don't see that defining dir-cache as "percent
> of namei() requests not found in the system wide name translation
> cache but handled by the per process name translation cache" is an
> improvement.  

Hmmm, there are two possible meanings of the hit percentage:

1) Percentage of namei() calls that hit either the namei or dir cache

2) Cache efficiency of each cache

I'm obviously prefering the latter, since the dir cache is only queried 
for a small fraction (few percent) of all namei calls, and it appears to
have a hit ratio of near zero (hardly ever 2%, haven't observed 1% too
often).

With my patch, I see that the namei() cache speeds up, say, 90% of all
namei calls (i.e. a speed factor of 10), while the dir cache provides
an answer in another 20% of cases (for another factor of 1.25). If the
numbers given by the current display are used, the effect of the dir
cache can't really be calculated so easily. (Ok, you can add the two
percentages, but since the second number is very small, the result is
always dominated by the namei percentage.)

Just try systat with and without the patch on a system under various 
load situations. I just do not consider always printing 0% into the
dir cache percentage column too useful ;-)

Regards, STefan

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020122202839.GA73384>