I'm aware that there is a huge performance decrease when using swap memory, but if you have wasted hard drive space is there any disadvantages to having (hopefully not using) a large swap partition?
3 Answers
Other than the obvious wasted disk space, there's no real disadvantage to having a large swap partition, though this depends to some extent on what you mean by "large." If you set it ridiculously large, swapping becomes less efficient than it already is, and you can even run yourself into situations where swapping will cause a crash, but assuming you're not going crazy with the size, the only thing you're doing is wasting disk space you could theoretically use for something else.
![](../../users/profiles/118258.webp)
- 53,385
- 32
- 133
- 208
is there any disadvantages to having (hopefully not using) a large swap partition?
Hypothetically, there is an advantage if you make your swap large enough and allocate correctly.
If you never needed the swap and if you allocate a large-enough swap on the inner cylinders of the disk then the rest of the filesystem is on the outside cylinders; thus the main filesystem has a higher linear velocity (and thus faster IO performance).
Note: all this is theoretical and prompted by your question. I have never actually done this in practice. This also assumes you are not using an SSD.
![](../../users/profiles/78702.webp)
- 8,266
- 9
- 41
- 86
Memory may be cheap, but it's still not free.
On my workstation I routinely go into swap just from normal system usage. (Of course, it is a _work_station...) With 16GB of RAM and 16GB of swap, I usually am about 2-3GB swapped out. Never seen it go higher than that, though I've got plenty of headroom there.
I don't even miss the disk space. It's even cheaper than memory.
![](../../users/profiles/126632.webp)
- 237,123
- 42
- 477
- 940