On Digitalocean I came up with this message when I want to add swap:
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. Doing so can impact the reliability of the underlying hardware for you and your neighbors. This guide is provided as reference for users who may have spinning disk systems elsewhere. If you need to improve the performance of your server on DigitalOcean, we recommend upgrading your Droplet. This will lead to better results in general and will decrease the likelihood of contributing to hardware issues that can affect your service.
Why is that? I thought it was necessary for creating a stable server (not running into memory issues)
Both RAM and SSD can improve the performance of your computer. But actually, RAM is orders of magnitude faster than an SSD. In theory, the transfer speed of an SSD can be up to about 6Gbps (equivalent to 750 MB/s) which is from the SATA interface.
Can an SSD be used externally? Yes.
If your system is low on RAM and it has to constantly use swap, it will not only degrade performance (the performance hit will be smaller in case you use an SSD), It will also shorten the life span of the HDD (this will be a serious problem for SSDs).
Swap usage becomes a performance problem when the Kernel is pressured to continuously move memory pages in and out of memory and swap space. Another advantage is that swap gives admins time to react to low memory issues. We will often notice the server acting slowly and, upon login, will notice heavy swapping.
I believe that here's your answer.
Early SSDs had a reputation for failing after fewer writes than HDDs. If the swap was used often, then the SSD may fail sooner. 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With