Swap size on RAM upgrade

Pongo Pan pongo_pan at fastmail.us
Wed Aug 8 16:58:26 UTC 2012


On Wed, 2012-08-08 at 09:24 -0600, compdoc wrote:
> The installer tends to create a swap that's as large as the ram size, but
> since my systems never use swap it's more of a 'nice to have' than a
> necessity. 
> 
> It's likely you'll never need the extra swap space, but it's a good idea to
> watch the usage over time and see.
> 
> 

I think that's right.  Modern Linux kernels are so good at managing
memory, moving apps and buffers around, etc., that swap is rarely used
much even in comparatively low memory situations as with the OP.  We've
been talking here about setting up a test computer with no swap and
seeing if it makes any difference.

As Steve Flynn points out, unless the OP is hibernating the computer
there's little reason to have a swap space as large as memory anymore.

It's easy to create an ad hoc swap space as an ordinary file.  This has
to be slightly less efficient but seemed to work very well when I tried
it (when I'd forgotten to create swap on an install once, and once when
the hd with swap on it died).  See man swapon.  I wouldn't bother
resizing swap and I'd just add more ad hoc with swapon in the unlikely
case it was ever needed.


-- 
pongo pan
Wed, 08 Aug 2012 09:56:59 -0700
Epicurus up 4:17, 2 users, load average: 0.62, 0.46, 0.48
Linux 3.2.0-27-generic
Ubuntu 12.04 LTS, gnome-session 3.2.1, unity 5.12.0






More information about the ubuntu-users mailing list