Benjamin Flesch = definitely rocks.”> What is the ideal size of/for a swap (swp) Partition in Ubuntu Linux? ~ mybeNi websecurity, web security and hack stuff.

web securitymybeNi websecurity

What is the ideal size for a swap (swp) Partition in Linux?

September 21st, 2007

Answer: Your Swap Partition’s size should be about 1 up to 2 times your RAM Memory Size, but maximum 2GB! (thanks to Abel Cheung)

So let’s say we have got 512 MB RAM: We create a 1GB (1024MB) Swap Partition, and everything is fine :)




2 Responses to “What is the ideal size for a swap (swp) Partition in Linux?”:

  1. Abel Cheung Says:

    Not really. For example, consider a Linux desktop machine having 2GB RAM, a 4GB swap partition is NOT fine. Definitely too much. This (swap == 2 * ram) thing is based on old myth (or old kernel bug).


  2. Tom Says:

    Too much Swap is not a problem though i think. It’s a waste of space but not actually something that causes bad performance or anything. If your ram is over 1Gb then you probably only need a swap if you use hibernate/suspend/sleep modes rather than shutting down properly but it will need to be at least ram size in order for the contents of ram to be saved to this handy space on your hard-drive. A little more than ram size is good. Twice Ram size means that when you get more ram you probably wont need to mess around resizing partitions ;)

    Good luck and have fun :)
    Regards from
    Tom :)


Leave a Reply


Google Traffic (7 days)

250
200
150
100
50
196
190
190
199
219
173
119
38.107.191.102