5

What are the disadvantages of using a swap file/partition on an SSD, even when swappiness is set to 0

I'm particularly interested in the /proc/sys/vm/swappiness=0 case. How much writes are still done, in practice, to that swap file, and does it have a negative impact to the SSD or any other disadvantage? Or would it nearly compare to not having a swap file?

I am pretty aware of what swappiness=0 means, just not of what it amounts to in practice.

My question stems from a problem I am experiencing without a swap: https://stackoverflow.com/questions/4567972/error-executing-aapt-all-of-the-sudden. There are similar questions regarding SSD and swap but they don't go in-depth into the swappiness=0: Disadvantages of not having a swap partition, Should I keep my swap file on an SSD drive?

pjv
  • 205

1 Answers1

2

If you are not using more memory than amount of your physical memory, then your swap file is not used at all. In that case it does not matter. If your swappiness=0.

I would say that if your applications are randomly using swap (exceeding amount of physical memory from time to time), it really do not matter. For example compiling software (in continuous integration machine, several builds per day) uses disk pretty heavily, and so far there hasn't been any problems.

Olli
  • 7,739