From owner-freebsd-questions@FreeBSD.ORG Thu Jan 6 09:42:49 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 63F9D1065782 for ; Thu, 6 Jan 2011 09:42:49 +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 BB8BA8FC08 for ; Thu, 6 Jan 2011 09:42:48 +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.4/8.14.4) with ESMTP id p069giY7080582 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 6 Jan 2011 09:42:45 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp.infracaninophile.co.uk p069giY7080582 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1294306965; bh=J+rn+hrZhyGCBy628bfKGVxlj1QvAjueNyCfv02Ias4=; 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<4D258E8C.4020004@infracaninophile.co.uk>|Date:=20T hu,=2006=20Jan=202011=2009:42:36=20+0000|From:=20Matthew=20Seaman= 20|User-Agent:=20Mozilla/5.0=20(M acintosh=3B=20U=3B=20Intel=20Mac=20OS=20X=2010.6=3B=20en-US=3B=20r v:1.9.2.13)=20Gecko/20101207=20Thunderbird/3.1.7|MIME-Version:=201 .0|To:=20Jeff=20Whitman=20|CC:=20freebsd -questions@freebsd.org|Subject:=20Re:=20Swap=20Space|References:=2 0<009b01cbad28$883d31c0$98b79540$@com>|In-Reply-To:=20<009b01cbad2 8$883d31c0$98b79540$@com>|X-Enigmail-Version:=201.1.1|OpenPGP:=20i d=3D60AE908C|Content-Type:=20multipart/signed=3B=20micalg=3Dpgp-sh a1=3B=0D=0A=20protocol=3D"application/pgp-signature"=3B=0D=0A=20bo undary=3D"------------enig8662DB4B109285603E8F0542"; b=GJAiOOdSCUqlTsv1Jc82+gBpQz4pIAhKrDNWa+XBpDxFX9lKOlihaBcii6LKE4aWp 7g0g/f0CfGa8ky168W5J/L1Nj0n/IkPBuVP1AnY1hXgOtralNbbSN4ADxRlLddS2hQ g4V/lVpTD2N4WEcXWeG269KSlLtE2AA7/omU/MdQ= Message-ID: <4D258E8C.4020004@infracaninophile.co.uk> Date: Thu, 06 Jan 2011 09:42:36 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Jeff Whitman References: <009b01cbad28$883d31c0$98b79540$@com> In-Reply-To: <009b01cbad28$883d31c0$98b79540$@com> X-Enigmail-Version: 1.1.1 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig8662DB4B109285603E8F0542" X-Virus-Scanned: clamav-milter 0.96.5 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_FAIL autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lucid-nonsense.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: Swap Space 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: Thu, 06 Jan 2011 09:42:49 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8662DB4B109285603E8F0542 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/01/2011 22:33, Jeff Whitman wrote: > I'm finding conflicting data on this. Some say 0, some say 1 times RAM= , > others say stay with 2 x RAM. Standard advice is 2x RAM -- but that dates back to the days when servers would have quantities of RAM measured in Megabytes rather than Gigabytes. 2 X RAM is a lot of disk space nowadays -- so either you'll need to find some other use for that space; eg. as a swap-backed /tmp partition, or else provide less swap. Also, there's a maximum of -- I think -- 8GB swap above which the performance of swap is degraded, due to algorithmic limits in the way memory pages are mapped onto disk pages. You need 1 x RAM + a few kB in order to support getting a crashdump. Or at least, you did before the days of minidumps. Not sure what the requirements are for getting system dumps nowadays. Swap space used for crashdumps should be a raw partition, not a file. On the other hand, for good performance you should not be using any significant amounts of swap in normal usage. You will need some swap, as the OS tends to use a small amount even when not under memory pressure. You should have swap to act as a buffer in case your machine suddenly starts using up more memory than you expect, either because of memory leaks, or due to demand spikes or through any number of other possible causes. Therefore, I think the best advice for a modern large memory system would be: If RAM > 8GB, then SWAP =3D 8GB[*] If RAM < 8GB, then SWAP =3D 1 x RAM + delta where delta is perhaps a Megabyte or so. Just rounding the partition size up to the next cylinder boundary should be enough (which happens automatically with most partitioning schemes). Cheers, Matthew [*] In this case, if you need crashdumps, you should dedicate another otherwise unused partition of the correct size as your dumpdev. --=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 --------------enig8662DB4B109285603E8F0542 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/ iEYEARECAAYFAk0ljpQACgkQ8Mjk52CukIwuyQCeNYOXs+6mSeiKW0jvm/eNMb7z 4QEAnjA4wjZ4KmxMjlc98CbXxnDWNLaf =fNQu -----END PGP SIGNATURE----- --------------enig8662DB4B109285603E8F0542--