Swap size on RAM upgrade

Amedee Van Gasse amedee-ubuntu at amedee.be
Wed Aug 8 22:56:35 UTC 2012

On Wed, August 8, 2012 17:10, Phil Dobbin wrote:
> Hash: SHA1
> Hi, all.
> I've just upgraded the RAM on an old machine running i686 Precise from
> 1280 -> 2048 & the swap disk is still as it was before the upgrade.
> Now, if the box had, say, 4GB's of RAM or greater, it wouldn't be too
> much of a deal but when dealing with such meagre quantities, I'm
> thinking it's probably better to adjust the swap size.
> I've Googled the subject but that's just led me to endless debates on
> the subject so I'm wondering what is the One True Way to do this on
> Ubuntu?

What you found on Google is correct: there is no One True Way.
Common folklore in the Linux days of yore used to be: swap size = ram size.

If you use hibernation: your swap must be at least the size of your ram,
and it must be a partition, not a file. So dig out that Live cd or usb and
use Gparted (make a backup, disclaimer about data loss, yadda yadda

If you don't use hibernation: swap can be *any* size, and it can be a
partition, a file, or a combination of both. Indeed you can have multiple


More information about the ubuntu-users mailing list