km@mathcs.emory.edu (03/17/90)
I've been watching our inode cache with pstat, and noticed that no matter how large we make it, it fills and then frequently collapses. The filling is no big surprise. If nothing else the arrival of several thousand netnews articles a day would do it. Of course someone doing a du on the src tree has an even more potent effect. The periodic collapsing was the surprise to me. I figured the inodes were stuck in the cache until LRU pushed them out one at a time, or maybe the file was removed. Neither of these would explain the collapse. A little further investigation reveals that the vfs code in SunOS 4.0.X calls vfs_purge on every mount and umount. This purges the entire ufs inode cache (and name lookup cache) for all filesystems, not just the one being mounted/unmounted. In the the case of mount this is necessary to invalidate any vnodes cached below the mount point. In the case of umount it would seem that a more careful purge could be done, since its only the ones in the unmounted filesystem that need to be purged. The purge is done vnode by vnode at any rate. I may be missing some subtlty on the umount issue. Since the automounter is busy mounting/umounting all the time, the cache is frequently purged. It just takes one user accessing a rarely used filesystem to kill the cache for the more important ones. Seems to me like automounter could be a performance problem. Ken Mandelberg | km@mathcs.emory.edu PREFERRED Emory University | {decvax,gatech}!emory!km UUCP Dept of Math and CS | km@emory.bitnet NON-DOMAIN BITNET Atlanta, GA 30322 | Phone: (404) 727-7963