Filesystem question

James Sutherland jas88 at cam.ac.uk
Thu Oct 12 21:04:26 GMT 2000


On Thu, 12 Oct 2000, David Collier-Brown wrote:

> Michael Tokarev wrote:
> > BTW, but is the OS filesystem cache was introduced for this!?
> > I see that all unices around me (linux, solaris, sco) have very
> > intelligent fs cache, that can work far better than samba implementation.
> > For our site, I see disk access only when the first client accesses
> > the directory, subcequent accesses takes results from fs cache
> > (for all other clients also) -- there is no disk activity there.
> > If samba will have its own cache implementation, then on this system
> > this actually will _decrease_ performance, will require more additional
> > resources (notably RAM) and decrease stability.  I recall that kernel
> > know far more information about filesystem than samba can have, and
> > kernel knows also available RAM size that can be used for caches,
> > and it keeps cache only once while samba will keep it in each smbd
> > process...
> 
> 	That particular cache doesn't have behavioral knowledge about
> the usage pattern, and has to be pretty general.  This causes me
> annoyance, as I expect far faster directory searches than I get, even
> when the directory blocks are all in core and most of the inodes are 
> cached as well.

Are cache hits really that slow in Solaris? :-)

Obviously there is some bottleneck here, but are you sure it lies in the
Samba<->Solaris interactions? I can't really comment - Solaris 7 Sparc
installation CD still acting as a paperweight, since I gave up waiting for
my old LX to boot... - but how much overhead can you trim off?

> OS vendors do work on this (I'm happy to say I benchmarked a Solaris 8
> improvement in this very area this spring), but some things are
> appropriate to cache in applications which know the usage pattern of
> their users.

Perhaps; I'm still not convinced... if Solaris is already caching the data
in question, surely a Samba-side cache will only cut out whatever
overheads Solaris has on cache hits? Also, why isn't the client caching
this data - ISTR Windows 9x/NT does have a client-side cache for networks,
so what's going wrong??

> As an example, we **don't** cache the stuff you send to a client when
> they ask for a directory traversal, and so have to pull it back from
> the OS even though we know the application is going to (stupidly) ask
> for it again!

The real question, though, is how much slower is extracting the data from
Solaris's cache as opposed to a Samba cache? Also, how much overhead will
the cache add to misses - think SparcStation 5 vs 10?

> Some careful groveling over the requests sent by Windows Explorer may
> well point to places where both we and Microsoft can improve things.

Undoubtedly; if you go prodding the innards of NT, you'll see some
HORRIBLE things. At one point, Explorer needs to calculate the length of a
string - which it does by sending a 0 and the string over RPC, and
receives a 1 and the string minus one character. Repeat until the string
is empty...


James.





More information about the samba-technical mailing list