Author: mjg
Date: Wed Nov  1 06:45:41 2017
New Revision: 325266
URL: https://svnweb.freebsd.org/changeset/base/325266

Log:
  namecache: ncnegfactor 16 -> 12
  
  It is used on each new entry addition to decide whether to whack an existing
  negative entry in order to prevent a blow out in size, but the parameter was
  set years ago and never revisited.
  
  Building with poudriere results in about 400 evictions per second which
  unnecessarily grab entries from the hot list.
  
  With the new parameter there are next to no evictions of the sort.

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c   Wed Nov  1 06:38:46 2017        (r325265)
+++ head/sys/kern/vfs_cache.c   Wed Nov  1 06:45:41 2017        (r325266)
@@ -194,7 +194,7 @@ static __read_mostly LIST_HEAD(nchashhead, namecache) 
 static u_long __read_mostly    nchash;                 /* size of hash table */
 SYSCTL_ULONG(_debug, OID_AUTO, nchash, CTLFLAG_RD, &nchash, 0,
     "Size of namecache hash table");
-static u_long __read_mostly    ncnegfactor = 16; /* ratio of negative entries 
*/
+static u_long __read_mostly    ncnegfactor = 12; /* ratio of negative entries 
*/
 SYSCTL_ULONG(_vfs, OID_AUTO, ncnegfactor, CTLFLAG_RW, &ncnegfactor, 0,
     "Ratio of negative namecache entries");
 static u_long __exclusive_cache_line   numneg; /* number of negative entries 
allocated */
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to