From owner-freebsd-current@FreeBSD.ORG Sun Oct 7 01:53:08 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B6899106564A for ; Sun, 7 Oct 2012 01:53:08 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vps.rulingia.com (host-122-100-2-194.octopus.com.au [122.100.2.194]) by mx1.freebsd.org (Postfix) with ESMTP id 2B3B58FC08 for ; Sun, 7 Oct 2012 01:53:07 +0000 (UTC) Received: from server.rulingia.com (c220-239-248-178.belrs5.nsw.optusnet.com.au [220.239.248.178]) by vps.rulingia.com (8.14.5/8.14.5) with ESMTP id q971qwVM007278 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 7 Oct 2012 12:52:59 +1100 (EST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.14.5/8.14.5) with ESMTP id q971qq5F047775 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 7 Oct 2012 12:52:52 +1100 (EST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.14.5/8.14.5/Submit) id q971qpJP047593; Sun, 7 Oct 2012 12:52:51 +1100 (EST) (envelope-from peter) Date: Sun, 7 Oct 2012 12:52:51 +1100 From: Peter Jeremy To: Sergey Kandaurov Message-ID: <20121007015251.GB22291@server.rulingia.com> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="98e8jtXdkpgskNou" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Darrel , current@freebsd.org Subject: Re: memory warnings r240891 | dmesgg X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2012 01:53:08 -0000 --98e8jtXdkpgskNou Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2012-Oct-04 23:51:09 +0400, Sergey Kandaurov wrote: >On 4 October 2012 20:18, Darrel wrote: >> warning: total configured swap (2621440 pages) exceeds maximum >> recommended amount (1852656 pages). =2E.. >This is because kernel needs some memory to manage swap too. >Currently for amd64 this roughly reduces to the following rule >(My apologies in advance for the extra simplification): > >100MB RAM per 800MB swap space. That is oversimplified to the point of being wrong. As of HEAD r239255 and 9-stable r240097, there's no longer a limit on amd64. The limit is still required on 32-bit architectures due to the limited KVA available. The actual KVA requirements (RAM is only allocated when the swap space is actually used) is about 5MB KVA per 1GB swap. The default swzone for i386 was 32MiB - which is sufficient for ~7GB swap (the 1852656 pages reported above) and was increased to 34.5MB for i386 in r239730 to support ~8GB swap (this is also in r240097). (It's all approximate because of the way swap space is allocated using struct swblock). See the thread starting http://lists.freebsd.org/pipermail/freebsd-current/2012-August/035839.html for more details. --=20 Peter Jeremy --98e8jtXdkpgskNou Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBw4HMACgkQ/opHv/APuIeuQwCdHFvTbsM3kwfE8/tjSGZrHnT6 qP8AniNYq04HoqobIz4PQYeKIl8yL3Of =pS8X -----END PGP SIGNATURE----- --98e8jtXdkpgskNou--