A few questions about FreeBSD

Steve O'Hara-Smith steve at sohara.org
Fri Sep 29 10:08:42 UTC 2017


On Fri, 29 Sep 2017 05:37:10 +0000
Manish Jain <bourne.identity at hotmail.com> wrote:

> 1) As a desktop system, is it needed to have a swap partition at all ? 
> My system is AMD Athlon X2 270 with 8 GB DDR3 RAM and no swap, running 
> KDE4. The box works wonderfully for me.
> 
> Is swap advisable for 8 GB ? 4 GB ? 2GB RAM ?

	Short answer yes.

	Long answer - these days you should size your system so that it
doesn't need swap under normal or even common abnormal conditions because
the disparity between memory speed and swap is dramatic even with SSDs.
Usually when there is swap the OS will make use of it for long unused pages
which frees a little more memory for active work.

	However it is the behaviour under abnormal conditions that makes
having swap desirable. Without swap the first thing a runaway memory eater
causes is random process killings, with swap the first symptom is things
getting slow but still working so you (as sysadmin) have a chance to do
something constructive about the problem. Graceful degradation is a good
thing to have.

	Also memory is cheap but disc (or SSD) space even cheaper allocating
a few gigs to swap is practically free.

-- 
Steve O'Hara-Smith <steve at sohara.org>


More information about the freebsd-questions mailing list