Christopher R. Hertel
crh at nts.umn.edu
Thu May 13 15:57:33 GMT 1999
> What I'm after is some sort of cache to reduce the number of these calls
> which actually need to go to the system. I might have time to write one in
> a couple of weeks time, however, I don't want to go around reinventing the
> wheel, so is this what is in smbd/dir.c ?
Yes, it is. It uses a simple double-linked list to cache directory
entries. Two things to note:
1) It's a global cache.
2) The cache size is set at 20.
It was a long time ago that I worked on that code and I don't know if
there was a reason for the low cache size or if it's been changed since or
if I made a mistake. This is the first problem report that I'm aware
> If so, it doesn't seem to be working, as I don't see the debug lines
> in the logfile (even at debug level=10, the lines should be printed
> at debug level 4).
You should see entries being added to the cache. If not, then we'll need
to take a look at smbd/filename.c which owns the code that uses the cache.
With the cache size so low, you wouldn't see that many cache hits. Let me
> Any comments/suggestions?
You might try setting a higher value for DIRCACHESIZE, but that won't
help if nothing is being added to the cache. I'd like to see the logs.
-- I have a shoehorn, the kind with teeth. --
Christopher R. Hertel -)----- University of Minnesota
crh at nts.umn.edu Networking and Telecommunications Services
More information about the samba-technical