Linux & SSD : How to speed up your VPS

Linux & SSD : How to speed up your VPS

When you want to buy a VPS, most of them use SSD,  because a SSD have a better capacity for reading/writing than a Hard Drive and it also have a response time up to 40x faster than HDD.

But there are some small configuration to edit to get the best performances with your SSD as linux systems are not totally optimized for them.

So we will see how to speed up your VPS and how to configure debian/ubuntu to use a SSD properly. For a new install of a server the rules are  :

  • Use a recent linux system : Kernel 3.60+
  • Keep some free space on a disk (5-15%)
  • Use ext4
  • in /etc/fstab add the noatime setting
# / was on /dev/sda1 during installation
UUID=33XXX-XXXX / ext4 noatime,errors=remount-ro 0 1
  • Limit the swap usage :

If you use :

cat /proc/sys/vm/swappiness 

The system should answer 60. So you just have to add the line below in /etc/sysctl.conf

vm.swappiness=1

Then reboot your system. And it's done your VPS should already be faster