From owner-freebsd-questions@FreeBSD.ORG Wed Sep 14 13:56:08 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79AF2106564A for ; Wed, 14 Sep 2011 13:56:08 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3fd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id D71EF8FC0A for ; Wed, 14 Sep 2011 13:56:07 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id p8EDu231035048 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 14 Sep 2011 14:56:02 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp.infracaninophile.co.uk p8EDu231035048 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1316008562; bh=Hs1fHZZU0BX/PQOX8rQ7P+A9my7CotnSnLxk6H/jxas=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Cc:Content-Type:Date:From:In-Reply-To: Message-ID:Mime-Version:References:To; z=Message-ID:=20<4E70B269.4020900@infracaninophile.co.uk>|Date:=20W ed,=2014=20Sep=202011=2014:55:53=20+0100|From:=20Matthew=20Seaman= 20|User-Agent:=20Mozilla/5.0=20(M acintosh=3B=20Intel=20Mac=20OS=20X=2010.6=3B=20rv:6.0.2)=20Gecko/2 0110902=20Thunderbird/6.0.2|MIME-Version:=201.0|To:=20Jonathan=20V omacka=20|CC:=20freebsd-questions@freebsd.org|S ubject:=20Re:=20Recommended=20SWAP=20space=20for=20large=20amounts =20of=20ram=20(8GB)|References:=20<4E709F62.60705@gmail.com>|In-Re ply-To:=20<4E709F62.60705@gmail.com>|X-Enigmail-Version:=201.3.1|O penPGP:=20id=3D60AE908C|Content-Type:=20multipart/signed=3B=20mica lg=3Dpgp-sha1=3B=0D=0A=20protocol=3D"application/pgp-signature"=3B =0D=0A=20boundary=3D"------------enigF5799931A0D46E8F1C78C2B2"; b=pU2kVuXgPjTDAI0muhaI9aef4+erwjkPwJWYW95lQY3X/7a9tVE/cq84TUF5f9sdT OaqriToFboNpj4vi2FvlQb1Xekg6ewPB//GtqlwLdJNoTE+Os9LUXOsfq8ooVMqSOs nCkqB8s6sO7WhbXG9P+mHInaO+v8pwNA14RmCtjk= Message-ID: <4E70B269.4020900@infracaninophile.co.uk> Date: Wed, 14 Sep 2011 14:55:53 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: Jonathan Vomacka References: <4E709F62.60705@gmail.com> In-Reply-To: <4E709F62.60705@gmail.com> X-Enigmail-Version: 1.3.1 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF5799931A0D46E8F1C78C2B2" X-Virus-Scanned: clamav-milter 0.97.2 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: Recommended SWAP space for large amounts of ram (8GB) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Sep 2011 13:56:08 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF5799931A0D46E8F1C78C2B2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 14/09/2011 13:34, Jonathan Vomacka wrote: > Each operating system seems to have different documentation regarding > what a decent swap size is for systems with large amounts of RAM. My > system only has 8GB of RAM. Some people have gone with the general idea= > that 2X the amount of RAM is sufficient but for systems with large > amounts of memory 1X the amount of RAM is fine. I was also told that > anything over 2GB of SWAP space will cause performance issues on the > system and that it is not recommended. >=20 > Either from the FreeBSD docs, or based on personal experiences, what is= > the recommended swap space for a 8GB system? Your opinions are greatly > appreciated The old rule of thumb of swap =3D 2 x RAM dates back to the days when 128MB RAM was a big deal. Nowadays, you're likely to have that much in your phone, and systems with 128GB RAM are not unknown. In these days of plentiful RAM, the new rule of thumb is "if you're swapping, then you're doing it wrong." You don't need anything like as much swap nowadays, at least, not as compensation for lack of RAM. You may need swap to back eg. tmpfs filesystems. You don't need swap nowadays for system dumps -- any partition with ephemeral data (or no data at all) can be used for dumping, and given that minidump capability exists now, you don't even need to supply the 1 x RAM + delta required for a full dump. That swap > 2GB resulted in performance problems was certainly true once, but I doubt very much that it is still the case in HEAD or the upcoming 9.0-RELEASE, nor probably in {7,8}-STABLE. IIRC the problem was due to avoiding integer overflow in some calculations deep inside the VM system, which is usually not a hugely difficult problem to fix. My recommendation: for systems with 1GB RAM or more, and that don't make heavy use of memory filesystems and the like, then 2GB swap is ample, and you can probably get away with as little as 1GB at need. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enigF5799931A0D46E8F1C78C2B2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5wsnEACgkQ8Mjk52CukIxgBwCcCZtzerhFhjMas6QRfN0fRLL6 5y4AoIjXSIuMTrWfz4xe8Sl0gajmZmaV =o2No -----END PGP SIGNATURE----- --------------enigF5799931A0D46E8F1C78C2B2--