Linux.com

Home Linux Community Forums Hardware Storage SWAP SPACE Partition question

SWAP SPACE Partition question

Link to this post 14 Feb 11

I have a question regarding swap space, I know linux uses that as virtual memory, I am currently running on ubuntu server 10.10.

Here is my question, will I see a speed increase since I have the space to spare, if I make a additional large swap space partition, or increase the size of my current one, my current swap space is 13 gigs.

Link to this post 14 Feb 11

The swap partition is very rarely used, it is only a backup location when your RAM has been filled. When it is in use you will see a reduction in system speed because a hard disk is far slower than RAM. The general rule is to set your swap to 2x RAM or 2G which ever is smaller.

Blowing up your swap space beyond your needs will not make the system faster, if you wish to use more swap than RAM you can search good for instructions to change your swappiness, after a test on that you will see why swap is for backup only.

Link to this post 14 Feb 11

makes sense, thanks.

Link to this post 04 Aug 11

Here is a screenshot of my laptop swap status.

I have a typical habit of assigning 2x times of RAM size. But this theory works out for moderate desktop or PC configurations.

Larger servers may need a different formula to work out how much swap is required. Anyway, as you can see if the SWAP usage is 90% ZERO all the times, you can reduce the SWAP eventually. Since usually allocating larger space is a overhead for kernel.

This is applicable for swap memory than compared to your utility other partitions.

Link to this post 05 Aug 11

kiran.kankipati wrote:

I have a typical habit of assigning 2x times of RAM size. But this theory works out for moderate desktop or PC configurations.

That might have been true years (many!) ago. It is not anymore.

You do not want to use swap, at all. In fact, it should be used only in rare cases(like if there's some kind of problem with some software that is taking up way to much memory).

If you are constantly using swap... GET MORE RAM!!!

Link to this post 24 Aug 11

use your SWAP space 3x from your RAM it will help you :D

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board