Do you need swap file with SSD?
This might be why you heard it could be bad to use an SSD for swap. Modern SSDs don't have this issue, and they should not fail any faster than a comparable HDD. Placing swap on an SSD will result in better performance than placing it on an HDD due to its faster speeds.
What is the swap file used for?
A swap file allows an operating system to use hard disk space to simulate extra memory. When the system runs low on memory, it swaps a section of RAM that an idle program is using onto the hard disk to free up memory for other programs.
How much swap file do I need?
5 GB is a good rule of thumb that will ensure you can actually hibernate your system. That should usually be more than enough swap space, too. If you have a large amount of RAM — 16 GB or so — and you don't need hibernate but do need disk space, you could probably get away with a small 2 GB swap partition.
Is swap file bad for SSD?
Although swap is generally recommended for systems utilizing traditional spinning hard drives, using swap with SSDs can cause issues with hardware degradation over time. Due to this consideration, we do not recommend enabling swap on DigitalOcean or any other provider that utilizes SSD storage.
What are swap files?
A swap file is a file that contains data retrieved from system memory, or RAM. By transferring data from RAM to a secondary storage device in the form of a swap file, a computer is able to free up memory for other programs. Swap files are a type of virtual memory, since they are not stored in physical RAM.]]>