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
-
How to configure Crontab on Linux
-
How to free up disk space on an Ubuntu Nginx or Apache Web Server
This article outlines useful commands you can run on your server in order to free up disk space.
-
How to monitor webdock server resources using Prometheus, Grafana, Node Exporter and Prometheus Alert Manager
-
How to Disable IPv6 on Your Webdock Server
The article explain how to disable IPv6 on your Webdock server, both temporarily and permanently.
-
Automating Initial Server Configuration with Ansible
Read our new article: Learn how to automate your cloud server configuration using Ansible.
-
Top Tools to Install on Your Ubuntu Web Server
A list of important tools that you can install on your production Ubuntu web server
-
How To Benchmark Your Server with YABS
A guide to do benchmarking of your server's CPU, network performance, and such using YABS.
-
Systemd Units - A Comprehensive Guide for Linux Admins
A detailed guide on systemd internals for Linux admins
-
A Quick Guide to Managing Systemd Services
A short guide that helps you manage systemd services
-
How to Benchmark PHP Performance on Your Webdock Server
Instructions for bechmarking PHP performance on your Webdock server