I've noticed my linux images didn't come with any swap space and had to allocate it myself. It would be nice to have space space allocated already in the linux images.
**Not all instances, just your LAMP preset. that one seems built for Wordpress and similar RAM-heavy apps, so let's give it some swap.
I need swap bad. Some software refuses to write to ram for security reasons.
Here's an instance of a customer who ran into problems because of no default configured swap space: http://digitalocean.uservoice.com/forums/136585-digital-ocean/suggestions/3778309-better-cpus-for-512mb-plan-or-provide-swaps
Swap is very justified for consumer. I might have virtual machine with occasional large spikes in RAM usage while VM responsivness is not an issue or priority. By using swap, there is no need to buy enough RAM to cover those spikes. Also it increases stability, because for low traffic server its better to hit swap that crash with OOM. Also often lots of allocated RAM is not in active use, so moving it to swap allows to run at less physical RAM without significant performance impact.
From hosting company perspective heavy swap usage means more disk I/O bandwidth. And since this bandwidth is shared across virtual machines, it is probably significantly expensive resource.
dd if=/dev/zero of=/swapfile1 bs=1024 count=1048576
chown root:root /swapfile
chmod 0600 /swapfile
add this to /etc/fstab:
/swapfile swap swap defaults 0 0
Should be default on low-end machines otherwise lamp doesnt work well
We've written articles in our community on how to add swap space which can be found at:
There are positives and negatives to both approaches we went with no swap to simplify setup and give customers the choice.
That's great you did it yourself. Not everyone needs swap space in their system. DOWNVOTE.
You won't be notified about changes to this idea.