SKVM Performance Tweaks

For the best performance, tweak your KVM VPS with the following commands:

For a SolusVM OS Template Install
:
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
sysctl -p


We are currently re-evaluating the commands above. Results seem to vary widely. Use at your own discretion.

For an official ISO Install:
echo 0 > /sys/block/sda/queue/rotational
echo 0 > /sys/block/sda/queue/rq_affinity
echo noop > /sys/block/sda/queue/scheduler
echo "echo 0 > /sys/block/sda/queue/rotational" >> /etc/rc.local
echo "echo 0 > /sys/block/sda/queue/rq_affinity" >> /etc/rc.local
echo "echo noop > /sys/block/sda/queue/scheduler" >> /etc/rc.local
echo 'vm.swappiness=5' >> /etc/sysctl.conf
echo 'vm.vfs_cache_pressure=50' >> /etc/sysctl.conf
sysctl -p

To potentially improve network performance:
echo "net.core.rmem_max=16777216" >> /etc/sysctl.conf
echo "net.core.wmem_max=16777216" >> /etc/sysctl.conf
echo "net.ipv4.tcp_rmem=4096 87380 16777216" >> /etc/sysctl.conf
echo "net.ipv4.tcp_wmem=4096 65536 16777216" >> /etc/sysctl.conf
sysctl -p

Extra Lines:
You can also add the noatime and nobarrier (barrier=0 for ext filesystems) options to your mounting setup (/etc/fstab). To remount without rebooting, use the -oremount option with the mount command.
  • 44 Users Found This Useful
Was this answer helpful?

Related Articles

How do I connect to my VPS? (SSH)

We recommend the program PuTTY for SSH. You can download it here:...

How do I set reverse DNS (RDNS/PTR)?

Clients can set reverse DNS (RDNS/PTR) in the SolusVM control panel. Click the Network tab and...

VNC (GUI) for CentOS

Please refer to this help article for help on installing a VNC server on CentOS:...

CPU/Host Passthrough

We will be happy to enable CPU host-passthrough mode on your KVM VPS upon request. Please submit...

OpenBSD IPv6 Issue

OpenBSD does not always play well with our current IPv6 networking setup. The following link...