home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!elroy.jpl.nasa.gov!ufo!parlier
- From: parlier@jpl-devvax.jpl.nasa.gov (Randy Parlier)
- Subject: RE: Dir Name Lookup Cache(dnlc) twiddling
- Message-ID: <1992Sep11.211440.14979@jpl-devvax.jpl.nasa.gov>
- Organization: Jet Propulsion Laboratory (NASA)
- Date: Fri, 11 Sep 1992 21:14:40 GMT
- Lines: 75
-
-
- >In article <1992Sep11.154227.7250@bristol.ac.uk> P.Smee@bristol.ac.uk (Paul Smee) writes:
- >>Anyhow, I have a vague memory of hearing that there is a parameter
- >>which can be fiddled when doing a vmunix build, which will increase the
- >>space reserved by the system for caching information about open inodes
- >>(or dirs, maybe?), and so might improve performance in an environment
- >>where the system is doing not very much (computationally), but using a
- >>lot of (small) files to do it. Can anyone provide enough further info
- >>to help us find and twiddle this, as that describes precisely the
- >>situation this little box is in?
- >>
-
-
- and then
- Terry Lambert
- terry_lambert@gateway.novell.com
- terry@icarus.weber.edu
-
- writes:
-
- > You are talking about the directory name lookup cache (dnlc).
- >There are several magic incantations effecting this, most requiring source:
- >
- > .......alot of good interesting stuff deleted....
- >
- >4. If you ask for too much cache, the dnlc will be turned off when
- > the kernel alloc fails to get the memory. If you have high
- > values for NPROCS or MAXUSERS, the cache size required will be
- > computed larger. Too large, and caching goes away entirely
- > (instead of scaling back, like you'd expect). Be careful that
- > you do not do this. Since the flag is static to dnlc, you will
- > not be able to tell that this is happening other than by inference.
-
-
-
- Name to inode conversion uses the DNLC. Some things that impair
- DNLC use are (a) long (greater than 14 character) names are not cached,
- (b)long symbolic link names increase pathname resolution time, and
- (c) deep directory structures require frequent cache access.
-
- If you don't have source code, about the only way you can change the
- size of the cache is modify the 'MAXUSERS' parameter.
-
- You can determine what your DNLC hit-rate is by using 'vmstat -s'.
- The last line reported by vmstat will say something like:
-
- 78494 total name lookups (cache hits 95% per-process)
- toolong 74
-
- You could try modifying MAXUSERS and monitoring your cache hit rate
- using vmstat to try and tune your system the way you want it.
-
- Note that 'MAXUSERS' also modifies the size of your inode cache which
- can accelerate changes to file attributes.
-
- There is also a buffer cache for some kernel structures that is used
- for inodes and cylinder group information. You can examine your
- buffer cache hit rate by doing the following:
-
- echo "bstats,2/D" | adb -k /vmunix /dev/mem | sed -n -e '3p' |
- awk '{printf("buffer cache hit rate: %8.2f%%\n",$3/$2 * 100.0)}'
-
- You can also use adb to change the number of pages used for buffer
- cache using the nbuf parameter:
-
- echo "nbuf?W0t100" | adb -w /vmunix
-
- Then reboot your machine.
-
- NOTE: This all applies to the SunOS. Totally irrelevant to Solaris
- I'm sure.
-
- Randy
- parlier@puente.jpl.nasa.gov
-
-