Optimizing Network Speed on Your Webdock KVM Server

Last updated: September 6th 2024

Introduction

This is a short article outlining steps that need to be taken to improve the network performance on your existing Webdock KVM servers.

After doing further tests and dealing with real customer workloads we found that we could improve the network performance by applying a few tweaks. These tweaks have already been added to the new image rebuilds and so the below instructions are for KVM servers that are created before September 6th, 2024.

With that said, let's jump to the instructions.

Applying the Tweaks

Note: As mentioned in the introduction these changes are only applicable for any KVM servers that are created before September 6th, 2024. First, log in to your server as a sudo user and switch to root.

$ sudo su -

Now run the below commands to apply the tweaks

# sysctl -w net.core.rmem_max=536870912
# sysctl -w net.ipv4.tcp_rmem="4096  122880  805306368"
# sysctl -w net.ipv4.tcp_wmem="4096  87380   805306368"
# sysctl -w net.ipv4.tcp_congestion_control=bbr
# sysctl -w net.core.default_qdisc=fq
# sysctl -w net.ipv4.tcp_no_metrics_save=1

However, the above tweaks are not persistent. To make them persistent across reboots they need to be added to the sysctl.conf file.

To add, run as root:

cat >> /etc/sysctl.conf << EOF
net.core.rmem_max=536870912
net.ipv4.tcp_rmem="4096  122880  805306368"
net.ipv4.tcp_wmem="4096  87380   805306368"
net.ipv4.tcp_congestion_control=bbr
net.core.default_qdisc=fq
net.ipv4.tcp_no_metrics_save=1
EOF

You can verify if those are added correctly by checking the sysctl.conf file

# cat /etc/sysctl.conf

In the output, at the bottom, you should see the config added.

That's it. Now the network performance should be much more improved and stable.

Conclusion

This short article provided instructions on applying some tweaks to your existing KVM server to optimize network performance.

If you need assistance with this, contact Webdock Support

Related articles