Date: Wed, 1 Nov 2017 06:45:41 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325266 - head/sys/kern Message-ID: <201711010645.vA16jf0E054903@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711010645.vA16jf0E054903>