KVM Disk I/O Optimization

The most important setting in order to get the most out of your VPS, is to use the virtio driver instead of the legacy IDE one. To do this you need to log into SolusVM and under the Settings tab, change Disk Driver from ide (default) to virtio. You will need to reboot your VPS through SolusVM for changes to apply.

Additionaly, you can improve I/O performance by using the following commands:

echo 0 > /sys/block/vda/queue/rotational
echo 0 > /sys/block/vda/queue/rq_affinity
echo noop > /sys/block/vda/queue/scheduler
echo "echo 0 > /sys/block/vda/queue/rotational" >> /etc/rc.local
echo "echo 0 > /sys/block/vda/queue/rq_affinity" >> /etc/rc.local
echo "echo noop > /sys/block/vda/queue/scheduler" >> /etc/rc.local
echo 'vm.swappiness=5' >> /etc/sysctl.conf
echo 'vm.vfs_cache_pressure=50' >> /etc/sysctl.conf

and then run

sysctl -p

Please note that in some cases /sys/block/vda/ can also be /sys/block/sda/. It depends on your OS and installation type (ISO or Template).

Another I/O tweak is to mount your partition with noatime. This can be done by opening /etc/fstab

vi /etc/fstab

and adding noatime to the options of the / file system, e.g. like this:

proc            /proc           proc    defaults        0       0
# / was on /dev/sda1 during installation
UUID=bf175032-898a-4883-a702-ca0ab9e51d1d /               ext4    noatime,errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=2d7209ed-b4c1-4bb6-96f2-73d7ba82ca9b none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0

You don't have to reboot the system for the changes to take effect - the following command will do:

mount -o remount /
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

KVM Official ISO Installation

Self Managed KVM VPS customers have the ability to install premade OS templates on their VPS....

KVM IPv4 Networking Setup

IPv4 Internet Protocol version 4 (IPv4) is the fourth version in the development of the...

KVM Windows Availability

Microsoft Windows is available if a couple of criteria are met.  The following two...

KVM Swap Missing?

SolusVM has a bug that does not allows templates installation to setup swap partition correctly....

KVM IPv6 Networking Setup

IPv6 Internet Protocol version 6 (IPv6) is the latest version of the Internet Protocol...