On Tue, 10 Aug 1999, Nick Christenson wrote:
Also, Sun has a BugId for this problem, 4212925. As of August 2, they have a patch for 2.6, numbered 105720-08. It seems to do a lot of things, but the explanation of it isn't as revealing as we'd like, so we're a little leery of putting it into production without extensive testing. We're playing with it, but can't comment on it's efficacy at this time. It might hash the DNLC table (That would be the right solution, and word is this will happen in 2.8), but for all I know it may just revert to 2.5.1's DNLC math.
Summary:
If you're running Solaris 2.6 or 2.7 in a high performance environment where a lot of files are being deleted over NFS, make sure your DNLC is not too large or you'll have HUGE problems. Trust me.
We went through this a few months ago, trying to migrate from Solaris 2.5.1 to 2.6. The larger ncsize in 2.6 is, in fact, the heart of the problem. In Solaris 2.5.1, ncsize maxes out at 17498. In Solaris 2.6, ncsize maxes out above 60000.
The Solaris NFS client in both of these versions does a linear scan of the cache every time you delete a file, looking for other entries which may have been links to the deleted file. The DNLC is hashed by pathname, not by vnode.
As of 105720-08, the NFS client checks the link count on the file being deleted. If the link count is 1, the linear scan is skipped. If the link count is greater than 1, the linear scan is still performed.
We have been using a patch previous to 105720-08 (maybe it was 105720-07, I don't know -- they just mailed me a file called "nfs" that I stuck in /kernel/fs :) in production for several months, and there is a definite performance boost in our environment using this workaround, with no visible side effects. We also reduced the ncsize without seeing a reduction in the DNLC hit rate, and saw an additional performance boost there. That's evidence suggesting that there is a performance hit for having a large DNLC, even after getting rid of that pesky linear scan.
--------------------------------| It's Your Internet! Alf Mikula |-------------------------------------- IT Systems Administrator | Alf.Mikula@corp.earthlink.net Earthlink Network | (626)296-5515