LinuxSoftware

Coding and tramping in Aotearoa / New Zealand

I've always followed the twice physical RAM rule. Works OK for me, but is getting a bit excessive.

howmuchswap.jpg

Right at the moment I have 1GB of swap of which only 20MB is being used. Still I've got plenty of drive space, 1GB for swap is nothing.

There is no limit to the size of your swap partition. Kernels before 2.2 had some limit, but that's ancient history now.

Michael Schwendt*....
Two times the RAM space as swap is an empirically determined value, based solely on experience, which over time has turned into a rule of thumb.

Old versions of the kernel had a swap space limit of 128 MB. You could create more, but it would never be utilized. People who had 32 MB or 64 MB made the experience that the swap space was enough even for huge compiler jobs on heavily used machines.

Nowadays, you could create an N GigaBytes large swap partition if you thought that any program would ever want to allocate such a large amount of virtual memory at once, or if you thought that your system would ever run so many (and I mean many) memory intensive processes at once that the kernel would see the need to swap out many really huge parts because everything would never fit into RAM at the same time.


Linux | DiskPartitions