Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm (re)installing Ubuntu on my Toshiba NB100 netbook (Intel Atom, 120GB HD, 2GB RAM). Already have a partition I call "Stuff" with all my media and docs. Will be deleting the one I had Win7 on (making it the swap), and then there is a recovery one.

How big a swap partition should I create?

share|improve this question

4 Answers 4

up vote 7 down vote accepted

See https://help.ubuntu.com/community/SwapFaq

share|improve this answer

For a netbook, you'll probably want to be able to hibernate the computer. The process of hibernation requires that all the data¹ in RAM be written out to the hard disc, in swap, which means that it's a good idea to have at least as much swap space as RAM. If you don't need to hibernate the computer you won't need that much swap.

Now, the trick is that this swap space doesn't actually have to be a dedicated swap partition. Like Windows, the kernel can use swap files on your regular filesystem², and they're just as fast as a swap partition. It's much easier to add more swap with a swap file than to re-partition, though. See the FAQ from this answer for instructions on how to add swap files.

So, in short, don't worry about how much swap you need; if you need more, you can easily add it.

¹: This is not quite true - before writing the data in RAM to swap, the kernel will remove from memory everything that it can. This will generally include a lot of program code (because the kernel can just read it back from the disc) and all the disc cache, etc.

²: This capability is actually filesystem-dependent. Most linux filesystems support having swap files on them - ext4, which is the default, certainly does. The new btrfs filesystem is an exception, so if you're playing with that you'll need a swap partition.

share|improve this answer

Usually it should be equal to your RAM which makes it 2GB which should be enough for day to day applications.

share|improve this answer

I think a rule said - for 1 gb or less of RAM swap must be the double of the RAM. - more than 1 gb you dont need to use more than 2 gb of swap.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.