From owner-svn-src-stable@FreeBSD.ORG Fri Jul 12 10:07:49 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0A37B8D0; Fri, 12 Jul 2013 10:07:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F0DD41B20; Fri, 12 Jul 2013 10:07:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CA7mau052186; Fri, 12 Jul 2013 10:07:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CA7mpN052185; Fri, 12 Jul 2013 10:07:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201307121007.r6CA7mpN052185@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 12 Jul 2013 10:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253259 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jul 2013 10:07:49 -0000 Author: kib Date: Fri Jul 12 10:07:48 2013 New Revision: 253259 URL: http://svnweb.freebsd.org/changeset/base/253259 Log: MFC r251282: When auto-sizing the buffer cache, limit the amount of physical memory used as the estimation of size, to 16GB. 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. MFC note: the commit message was adjusted to match the code change, the sizing cap is for 16GB, as noted by delphij. Approved by: re (delphij) Modified: stable/9/sys/kern/vfs_bio.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_bio.c ============================================================================== --- stable/9/sys/kern/vfs_bio.c Fri Jul 12 10:07:21 2013 (r253258) +++ stable/9/sys/kern/vfs_bio.c Fri Jul 12 10:07:48 2013 (r253259) @@ -562,7 +562,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;