Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Aug 2012 11:16:08 -0700
From:      David O'Brien <obrien@FreeBSD.org>
To:        Dag-Erling =?unknown-8bit?Q?Sm=F8rgrav?= <des@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r239730 - head/sys/i386/include
Message-ID:  <20120828181607.GA56329@dragon.NUXI.org>
In-Reply-To: <201208271322.q7RDMSEw002945@svn.freebsd.org>
References:  <201208271322.q7RDMSEw002945@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120828181607.GA56329>