From owner-freebsd-questions@FreeBSD.ORG Wed Sep 14 13:57:48 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 195DE106566B for ; Wed, 14 Sep 2011 13:57:48 +0000 (UTC) (envelope-from juvix88@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 971BD8FC19 for ; Wed, 14 Sep 2011 13:57:47 +0000 (UTC) Received: by wyh15 with SMTP id 15so2205824wyh.13 for ; Wed, 14 Sep 2011 06:57:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=O0Mn2zAJpeTw4VFkFSEQxNBlkAIXP504tZ0odYzzpyA=; b=SoiKRN9hRPIgCxizZJclaMDIuaetOvelEljH2hnfAnpb+jqyESgqhxSgCG3jm4RV23 7oQj/KsY9r2HgBM5M9GebDbL5BzjQ9/c7JRcGMRHe73XMtuip2Irfa2SLRQNjKe45sIx roPmX+qLTXXMerKMfA/v5ObU3/HpKv5ulxDh4= MIME-Version: 1.0 Received: by 10.227.196.194 with SMTP id eh2mr1133975wbb.52.1316008666534; Wed, 14 Sep 2011 06:57:46 -0700 (PDT) Received: by 10.180.24.200 with HTTP; Wed, 14 Sep 2011 06:57:46 -0700 (PDT) Received: by 10.180.24.200 with HTTP; Wed, 14 Sep 2011 06:57:46 -0700 (PDT) In-Reply-To: <4E70B269.4020900@infracaninophile.co.uk> References: <4E709F62.60705@gmail.com> <4E70B269.4020900@infracaninophile.co.uk> Date: Wed, 14 Sep 2011 09:57:46 -0400 Message-ID: From: Jonathan Vomacka To: Matthew Seaman Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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:57:48 -0000 Excellent response. Thank you so much. On Sep 14, 2011 9:56 AM, "Matthew Seaman" wrote: > > 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. > > > > 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 = 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 > > -- > 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 >