
Way to give small digital ocean box more RAM - andrewfromx
dd if=&#x2F;dev&#x2F;zero of=&#x2F;var&#x2F;swap.img bs=1024k count=1000<p>mkswap &#x2F;var&#x2F;swap.img<p>swapon &#x2F;var&#x2F;swap.img<p>if you are paying $5&#x2F;month on digital ocean for 512MB Memory machine, the above commands will place a 1000MB file on your drive (it&#x27;s ok u have 20GB) and use that for swap space so you can exceed your 512 limit.
======
k_sh
Small world- I was looking into this earlier today.

From DigitalOcean's site:

"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.

If you need to improve the performance of your server, 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."

~~~
andrewfromx
all I'm trying to do is compile rust-lang with make. Without doing the above
trick it runs out of memory during the compile. Surely I can do this trick,
compile, reboot and everything will be fine?

~~~
k_sh
Absolutely. I'm using swap to duct-tape a memory leak in production until I
have the time to fix the leak :)

