Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
chown and chmod need sudo, as dd also used sudo to create them. Actually, chown can be skipped as the file is already owned by root:root.
very useful on basic droplets with 512MB ram. i was getting clamav error due and adding swap space fixed it.
thank you
This may seem like a silly question, but which parameter should I change in the “dd” command if I want to make a 1024 Mb swap file? Thank you!
@Nathan: Edit the count=512k argument with the size of your choice, in your case it would be count=1024k
I have read that, as a rule, swap space should be 2x ram. I will be using a 512 ram or 1g ram droplet to host 1 or 2 drupal sites, plus a vpn with a few users. Should I follow the 2x rule?
A couple more quetions:
Does this tutorial create a partition, or just a swap file?
Is it important to do this upon droplet creation, or is it also ok to do it at any time?
Thanks for the excellent tutorial and info!
@pensivedog: 512MB should be enough to prevent a droplet from crashing. We don’t recommend creating swap files larger than 512MB.
<strong>Does this tutorial create a partition, or just a swap file?</strong> Swap file.
<strong>Is it important to do this upon droplet creation, or is it also ok to do it at any time?</strong> It doesn’t matter – you can add swap whenever you want.