Linux how much swap space do you have?

Yondaime

Adept
Aug 22, 2007
391
2
0
36
How much swap space do you have on your Linux machines?

I have 3gb ram and fedora x64 and am wondering how much space I should allocate for SWAP
 

hellknight_mnd

Disciple
May 4, 2008
132
2
0
38
I have 4 GB of RAM, 64-bit Fedora & Arch, and I have allocated around 3.2 GB to swap.. I was using 8 GB RAM for a month, still the swap was 3.2 GB.. no problems yet..
 

Dark Star

ex-Mod
May 7, 2006
7,099
513
257
Swap Space : - Double the memory size if Ram is < 3.2Gb. ( ~4Gb Swap Size )

Add 2 to the memory size if ram is > 3.2Gb. ( ~5gb swap size)
 

baccilus

Skilled
Oct 21, 2007
1,695
123
152
39
Chandigarh
I have never seen much of the swap space being used even with a computer with just 2GB of RAM. What is the point of reserving so much of space for SWAP? On my Netbook, I have 2 GB of RAM and just 1GB swap and I have never seen swap usage go above 30-40%.
 

vishalrao

Global Moral Police
Skilled
Nov 10, 2007
5,380
1,694
302
Pune, India
I've got 4 GB RAM at home and 8 GB RAM in the office. I've just got 2 GB swap and don't notice any performance issues. Plus the swap is hardly used anyway whenever I check it :)
 

Yondaime

Adept
Aug 22, 2007
391
2
0
36
vishalrao said:
I've got 4 GB RAM at home and 8 GB RAM in the office. I've just got 2 GB swap and don't notice any performance issues. Plus the swap is hardly used anyway whenever I check it :)
:eek:hyeah: even I have never noticed the swap being used ever when I was using Ubuntu on my desktop which has 2Gb ram and 2Gb swap space..
 

TEUser2K1

Skilled
Jul 16, 2007
1,131
829
202
Mumbai
mostly swap is not found used on linux systems even though we meticulously configure it. Have read somewhere that we have set priority, etc. and ensure at least once that swap is usable on the system.

normally RAM Size x 1.5 should be the size of swap. If you have above 6GB RAM, swap may not be required, normally.
 

Yondaime

Adept
Aug 22, 2007
391
2
0
36
Prole73 said:
mostly swap is not found used on linux systems even though we meticulously configure it. Have read somewhere that we have set priority, etc. and ensure at least once that swap is usable on the system.
normally RAM Size x 1.5 should be the size of swap. If you have above 6GB RAM, swap may not be required, normally.
nice :)

do you have link to that article ?
 

vishalrao

Global Moral Police
Skilled
Nov 10, 2007
5,380
1,694
302
Pune, India
Good point about hibernate/suspend/resume, yes you probably need swap, and yes, unless distro's support hibernating to other partitions... which I have no clue about coz I don't bother hibernating with SSDs in my desktop and laptop :p
 

silverbyte

Disciple
Aug 19, 2008
185
10
32
All you guys could try doing "swapoff -a". It should generally enhance performance and your desktop should generally zip through. I have been reading a lot of discussions on LLKML that swap is generally unnecessary for >3GB RAM. In fact if you are using your machine to run MySQL/Postgresql, it is recommended that you keep 0 swap.