Network Performance Tuning
The process of determining the optimizations in this paper was in part drawn from past
experience and from analysis of data captured during the execution of uperf
.
This topic covers the operating system settings that will directly affect the networking performance in Linux® and KVM guests. Here is the list of all the settings that were changed from the operating system default settings.
Summary of used /proc settings
The following table is a list of all the settings (located in the /proc file system) that were used/adjusted to obtain the results contained in this paper.
Sysctl Variable | Sysctl value |
kernel.randomize_va_space | 0 |
net.core.netdev_max_backlog | 25000 |
net.core.rmem_max | 4136960 |
net.core.wmem_max | 4136960 |
net.ipv4.tcp_congestion_control | cubic |
net.ipv4.tcp_fin_timeout | 1 |
net.ipv4.tcp_limit_output_bytes | 131072 |
net.ipv4.tcp_low_latency | 0 |
net.ipv4.tcp_max_tw_buckets | 450000 |
net.ipv4.tcp_rmem | 4096 87380 4136960 |
net.ipv4.tcp_tw_reuse | 1 |
net.ipv4.tcp_wmem | 4096 16384 4136960 |
Using Sysctl to override default settings
[root@kvm(host|guest) ~] # echo "value" > /proc/sys/location/variable
the sysctl command is available to change system/network settings. Sysctl provides methods of overriding default setting values on a temporary basis for evaluation purposes as well as changing values permanently that persist across system restarts.
[root@kvm(host|guest) ~] # sysctl -a | less
[root@kvm(host|gFor ID uest) ~] # sysctl variable1 [variable2] [...]
[root@kvm(host|guest) ~] # sysctl -w variable=value
[root@kvm(host|guest) ~] # vi /etc/sysctl.conf
[root@kvm(host|guest) ~] # variable = value
[root@kvm(host|guest) ~] # sysctl -p or sysctl -p /etc/sysctl.conf
The updated sysctl.conf values will now be applied when the system restarts.