Date: Sun, 02 Jun 2013 21:27:53 -0700 From: Alfred Perlstein <bright@mu.org> To: Konstantin Belousov <kib@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r251282 - head/sys/kern Message-ID: <51AC1B49.9090001@mu.org> In-Reply-To: <201306030416.r534GmCA001872@svn.freebsd.org> References: <201306030416.r534GmCA001872@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hey Konstaintin, shouldn't this be scaled against the actual amount of KVA we have instead of an arbitrary limit? -Alfred On 6/2/13 9:16 PM, Konstantin Belousov wrote: > Author: kib > Date: Mon Jun 3 04:16:48 2013 > New Revision: 251282 > URL: http://svnweb.freebsd.org/changeset/base/251282 > > Log: > When auto-sizing the buffer cache, limit the amount of physical memory > used as the estimation of size, to 32GB. This provides around 100K of > buffer headers and corresponding KVA for buffer map at the peak. > Sizing the cache larger is not useful, also resulting in the wasting > and exhausting of KVA for large machines. > > Reported and tested by: bdrewery > Sponsored by: The FreeBSD Foundation > > Modified: > head/sys/kern/vfs_bio.c > > Modified: head/sys/kern/vfs_bio.c > ============================================================================== > --- head/sys/kern/vfs_bio.c Mon Jun 3 04:11:42 2013 (r251281) > +++ head/sys/kern/vfs_bio.c Mon Jun 3 04:16:48 2013 (r251282) > @@ -560,7 +560,8 @@ kern_vfs_bio_buffer_alloc(caddr_t v, lon > nbuf += min((physmem_est - 4096) / factor, > 65536 / factor); > if (physmem_est > 65536) > - nbuf += (physmem_est - 65536) * 2 / (factor * 5); > + nbuf += min((physmem_est - 65536) * 2 / (factor * 5), > + 32 * 1024 * 1024 / (factor * 5)); > > if (maxbcache && nbuf > maxbcache / BKVASIZE) > nbuf = maxbcache / BKVASIZE; >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51AC1B49.9090001>