DragonFly BSD
DragonFly commits List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/vfs/nfs nfs_vnops.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 8 Apr 2004 15:32:15 -0700 (PDT)

dillon      2004/04/08 15:32:15 PDT

DragonFly src repository

  Modified files:
    sys/vfs/nfs          nfs_vnops.c 
  Log:
  Introduce negative (ENOENT) caching for NFS.  Before this, an attempt to
  lookup a non-existant path would ALWAYS result in packet traffic.  That is,
  NFS was only attribute-caching successful lookups, not failed lookups,
  and was not making use of the VFS cache facility virtually at all.  This new
  features complements the existing attribute cachign feature.
  
  Add a sysctl, vfs.nfs.neg_cache_timeout, which controls the timeout for
  negatively cached lookups.  The default is 3 seconds.  You can set this
  sysctl to 0 to recover the old non-negative-caching behavior.
  
  This makes a HUGE difference for programs which search nfs directories, such
  as compilers (the header file search path), make, and a few other utilities.
  NFS packet traffic can be reduced upwards of 90%.  For example, with /usr/src
  mounted via NFS, building libc a second time without negative caching
  generates 66000 packets of NFS traffic in each direction, building libc
  a second time with negative caching enabled generates 9500 packets worth
  of NFS traffic, in EACH DIRECTION.  While it is true that negative lookups
  are cached on the NFS server, the huge reduction in network traffic and
  equivalent reduction in synchronous read latencies result in radically
  reduced overheads across the board for operations which generate a lot of
  negative hits.
  
  A buildworld test with the default 3 second negative caching timeout went
  from 2265 seconds to 1900 seconds.
  
  Revision  Changes    Path
  1.20      +44 -4     src/sys/vfs/nfs/nfs_vnops.c


http://www.dragonflybsd.org/cvsweb/src/sys/vfs/nfs/nfs_vnops.c.diff?r1=1.19&r2=1.20&f=h



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]