namei Cache

From: Wolfram Schneider <wosch(at)apfel.de>
Date: Sat, 24 May 1997 00:18:11 +0200 (MET DST)

Michael Beckmann writes:
>Hallo,
>
>weiß jemand wie ich den namei Cache vergrößern kann ? (FreeBSD 2.2 falls
>das wichtig ist)

Für 2.2.x Kernel neu compilieren ;-(

In 3.0-current wurde der namei Cache stark modifiziert:

phk 97/05/04 02:17:39
  Log:
  4. Never reuse namecache enties, malloc new ones when we need it, free
      old ones when they die. No longer a hard limit on how many we can
      have.
  
  5. Remove the upper limit on namelength of namecache entries.
  
  6. Make a global list for negative namecache entries, limit their number
      to a sysctl'able (debug.ncnegfactor) fraction of the total namecache.
      Currently the default fraction is 1/16th. (Suggestions for better
      default wanted!)
  
  8. Remove the LRU list for namecache entries, not needed. Remove the
      #ifdef NCH_STATISTICS stuff, it's not needed either.
  
  9. Use the vnode freelist as a true LRU list, also for namecache accesses.
  
  10. Reuse vnodes more aggresively but also more selectively, if we can't
      reuse, malloc a new one. There is no longer a hard limit on their
      number, they grow to the point where we don't reuse potentially
      usable vnodes. A vnode will not get recycled if still has pages in
      core or if it is the source of namecache entries (Yes, this does
      indeed work :-) "." and ".." are not namecache entries any longer...)
  
  Bugs:
          The namecache statistics no longer includes the hits for ".."
          and "." hits.
  
  Performance impact:
          Generally in the +/- 0.5% for "normal" workstations, but
          I hope this will allow the system to be selftuning over a
          bigger range of "special" applications. The case where
          RAM is available but unused for cache because we don't have
          any vnodes should be gone.
  
          Maybe a one slot cache for unused namecache entries should
          be implemented to decrease the malloc/free frequency.
  
  Revision Changes Path
  1.25 +105 -107 src/sys/kern/vfs_cache.c
  1.85 +53 -45 src/sys/kern/vfs_subr.c
  1.47 +2 -3 src/sys/nfs/nfs_vnops.c
  1.14 +6 -18 src/sys/sys/namei.h
  1.44 +7 -2 src/sys/sys/vnode.h
Received on Sat 24 May 1997 - 01:48:04 CEST

search this site