In this post I want to share a little (and very simple) tutorial that has helped me quite a lot when using Linux VPS (Virtual Private Server) instances.
The problem: cheap Linux VPS instances – such as the ones you can get on Vultr for instance – often do not have much RAM. While the CPU power these Linux VPS have available will be enough for most tasks, you will find out that the system might experience RAM bottlenecks.
The solution: create and activate some Swap space on your Linux VPS instance. Especially when the Linux VPS instance has a SSD (Solid State Drive) drive the Swap space will perform quite fast.
The tutorial:
cd /
sudo dd if=/dev/zero of=swapfile bs=1M count=3000sudo mkswap swapfilesudo chmod 600 swapfilesudo swapon swapfile/etc/fstab) with your text editor of choice (I am using nano in this example).sudo nano /etc/fstab/swapfile none swap sw 0 0cat /proc/meminfoI really hope this tutorial can be useful to some of you! Please do not hesitate dropping a comment in case you have any questions.