svn commit: r325266 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Wed Nov 1 06:45:43 UTC 2017
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 */
More information about the svn-src-head
mailing list