From owner-svn-src-all@FreeBSD.ORG Tue Aug 28 18:16:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 664) id 09999106566C; Tue, 28 Aug 2012 18:16:09 +0000 (UTC) Date: Tue, 28 Aug 2012 11:16:08 -0700 From: David O'Brien To: Dag-Erling =?unknown-8bit?Q?Sm=F8rgrav?= Message-ID: <20120828181607.GA56329@dragon.NUXI.org> References: <201208271322.q7RDMSEw002945@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201208271322.q7RDMSEw002945@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r239730 - head/sys/i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 18:16:09 -0000 On Mon, Aug 27, 2012 at 01:22:28PM +0000, Dag-Erling Smrgrav wrote: > Author: des > Date: Mon Aug 27 13:22:27 2012 > New Revision: 239730 > URL: http://svn.freebsd.org/changeset/base/239730 > > Log: > Parly revert r239255: reinstate a default maxswzone on i386, where KVA is > scarce, but set it slightly higher so we can handle 8 GB of swap. Thank you for dealing with this issue. I had a diff addressing this I had prepared but had yet to send to alc for review. The comment below says to me the target swap size is 16GB, not 8GB. >From recent 10-CURRENT experience where I hit the VM_SWZONE_SIZE_MAX limit many times I think shooting for 16GB is more realistic with today's desktop application mix. Or at least 12GB if KVA usage for supporting 16GB is a concern. All it took to hit this was a 2GB tmpfs and running two web browsers with many tabs open. > + * 276 is sizeof(struct swblock), but we do not always have a definition > + * in scope for struct swblock, so we have to hardcode it. Each struct > + * swblock holds metadata for 32 pages, so in theory, this is enough for > + * 16 GB of swap. In practice, however, the usable amount is considerably > + * lower due to fragmentation. The old definition from r102738 (dillon 2002-08-31) was "32 * 1024 * 1024" or 32MB. This allowed for 7GB of swap from a 16GB swap partition, per top(8)'s "Swap total" reporting of swap usage when I would get kernel: swap zone exhausted, increase kern.maxswzone kernel: pid 81073 (firefox-bin), uid 1765, was killed: out of swap space every couple of days. > +#define VM_SWZONE_SIZE_MAX (276 * 128 * 1024) Will 34.5MB, really allow 16GB swap? On the machine you tested this on, what did top(8) report when the swap partition was say 20GB? thanks, -- -- David (obrien@FreeBSD.org)