Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jul 2014 19:15:48 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Arthur Chance <freebsd@qeng-ho.org>
Cc:        FreeBSD-Questions <freebsd-questions@freebsd.org>
Subject:   Re: How much swap space for a 32 GB RAM system?
Message-ID:  <20140722191548.e3945a1e.freebsd@edvax.de>
In-Reply-To: <53CE8BB8.7030303@qeng-ho.org>
References:  <53CE8BB8.7030303@qeng-ho.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 22 Jul 2014 17:05:12 +0100, Arthur Chance wrote:
> I'm getting a new machine with 32 GB of memory. The old "twice physical 
> memory" sizing seems ridiculous, so how big should I make swap? Do I 
> even need swap with this much memory?

Need? Probably not, but you _never_ know... So preparing
a file-backed swap could be a nice solution: you do not
have to dedicate a fixed size partition for swap, and
depending on your disk setup (maybe SSD?) the speed (_if_
it gets in use) will be good enough. In order to do this,
you use dd to create a sparse file, configure it as a
memory disk, and enable it with swapctl. The disk space
will only be used if the swap actually is written to,
so when it's not in use, no disk occupation will appear.
However, the question of if you _need_ swap or not is
not directly related to the amount of RAM installed, but
to the programs you're running. Remember that a malicious
program can easily fill 32 GB, and if that happens, the
system will be happy about some swap to perform a halfway
decent crash. ;-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140722191548.e3945a1e.freebsd>