Date: Wed, 14 Sep 2011 09:57:46 -0400 From: Jonathan Vomacka <juvix88@gmail.com> To: Matthew Seaman <m.seaman@infracaninophile.co.uk> Cc: freebsd-questions@freebsd.org Subject: Re: Recommended SWAP space for large amounts of ram (8GB) Message-ID: <CABfwSFoNm_O1wdx2oKYWpUWBtOxKdWD8mozFt70yA--vz%2BJ0ew@mail.gmail.com> In-Reply-To: <4E70B269.4020900@infracaninophile.co.uk> References: <4E709F62.60705@gmail.com> <4E70B269.4020900@infracaninophile.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
Excellent response. Thank you so much. On Sep 14, 2011 9:56 AM, "Matthew Seaman" <m.seaman@infracaninophile.co.uk> 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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABfwSFoNm_O1wdx2oKYWpUWBtOxKdWD8mozFt70yA--vz%2BJ0ew>