Swap File Article – Still Valid?

Hi,

On your documentation you have an article where you ALWAYS recommend to setup a Swap on VPS servers as we can read at:

But is this article still valid when using for example Ubuntu 16.04 and a fast VPS with SSD disks like one from Linode or Digitalocean.

Im asking this because I found an article on Digitalocean documentation where they say that we should not use SWAP in their servers, mainly because of the SSD disks as you can read on the yellow note at:

So what do you guy’s think? Should we still use SWAP on fast SSD VPS servers?

Thanks

It depends on how much RAM your VPS has.

Of course DigitalOcean will tell customer not to setup any swap, because it increases the volume of R/W operations.

As a general rule, you could try running your sites without any swap; if you notice anything weird you should try the swap file, compare before and after and make a decision.

1 Like

Hi @janiosarmento,

Thanks for your opinion. I will try to make some tests in the next days when i have some free time and research more about this.

At this phase i will mainly use EasyEngine with Linode and DigitalOcean VPS servers with 1 and 2GB RAM.

So does anyone has experience regarding using SWAP on 2GB VPS Servers with SSD Disks?

Thanks

I sell VPSs (not from DO or any other provide, I have my own Proxmox cloud), and use swap on all RAM sizes.

With 1GB I think you’ll need swap; with 2GB it may be (or be not) optional.