openSUSE and SUSE Linux sets default values for some of the network related Kernel parameters. While these are certainly not something that reduces the performance on your linux but are set considering optimal across platforms. With Kernel 2.6 (default in recent releases of openSUSE & SuSE Linux), there are some fine tuning you can do to improve Network performance and get that extra out of your system.
The parameters that we focus to improve performance are
net.core.rmem_max
Sets the Maximum Socket Receive Buffer for all protocols
net.core.wmem_max
sets the Maximum Socket Send Buffer for all protocols
net.ipv4.tcp_rmem
Sets the Maximum Socket Receive Buffer for TCP Protocol (overides the defaults set by net.core.rmem_default)
net.ipv4.tcp_wmem
Sets the Maximum Socket Send Buffer for TCP Protocol (overides the defaults set by net.core.wmem_default)
net.ipv4.tcp_no_metrics_save
Enables/Disables the behaviour of cachek performance charecteristics connection. By default, Linux Kernel remembers connection performance and congestion charecteristics.
net.ipv4.tcp_reordering
Sometimes, packet reordering in a network can be interpreted as packet loss and hence increasing the value of this parameter should improve performance (default is “3”)
net.ipv4.tcp_congestion_control
You can set this to one of the manu available high speed congestion variants like “cubic” “hs-tcp” (default is “reno”)
Before we set the values, lets look at the current values.
The following displays a long list of current values set for the Kernel Paramters.
opensuse11:~ # sysctl -a
To view the values of interest here
opensuse11:~ # sysctl -a | egrep “rmem|wmem|tcp_congestion|reordering|metrics”| egrep -v “default|udp|lowmem”
net.ipv4.tcp_reordering = 3
net.ipv4.tcp_wmem = 4096 16384 4194304
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_no_metrics_save = 0
net.ipv4.tcp_congestion_control = reno
net.core.wmem_max = 131071
net.core.rmem_max = 131071
We can set the values are as follows:
net.ipv4.tcp_reordering = 20
net.ipv4.tcp_wmem = 8192 87380 16777216
net.ipv4.tcp_rmem = 8192 87380 16777216
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_congestion_control = cubic
net.core.wmem_max = 16777216
net.core.rmem_max = 16777216
To set the values to be set at boot time, we need to edit the file “/etc/sysctl.conf” and add the above lines. However, this will not take effect immediatly. To make the changes to take effect immediatly,
opensuse11:~ # sysctl -p /etc/sysctl.conf
Alternatively, you can set one parameter value at a time as follows:
opensuse11:~ # sysctl -w net.ipv4.tcp_reordering=20
opensuse11:~ # sysctl -w net.ipv4.tcp_wmem=”8192 87380 16777216″
opensuse11:~ # sysctl -w net.ipv4.tcp_rmem=”8192 87380 16777216″
opensuse11:~ # sysctl -w net.ipv4.tcp_no_metrics_save=1
opensuse11:~ # sysctl -w net.ipv4.tcp_congestion_control=cubic
opensuse11:~ # sysctl -w net.core.wmem_max=16777216
This should improve Network Performance on your SuSE or openSUSE Linux.
hi, is there a way to clean these network buffer?
because when I running a LOTs connections.
After two~three hours, I always get
no buffer space available in /var/log/messages.
I wish there is a way to clean the network buffer in opensuse 11.1.
Thanks in Advance!
excellent new openSUSE
useful for tuning
but I get an error message line
linux:/etc # sysctl -w net.ipv4.tcp_wmem=”8192 87380 16777216″
error: “Invalid argument” setting key “net.ipv4.tcp_wmem”
error: “87380” must be of the form name=value
error: “16777216″” must be of the form name=value
linux:/etc # sysctl -w net.ipv4.tcp_rmem=”8192 87380 16777216″
error: “Invalid argument” setting key “net.ipv4.tcp_rmem”
error: “87380” must be of the form name=value
error: “16777216″” must be of the form name=value
default parameters are good, the maximum bandwidth available
the problem Reno and cubic (terrible web page download)
htcp the perfect solution for a single set
sysctl -w net.ipv4.tcp_congestion_control=htcp
or sysconfog.conf paste net.ipv4.tcp_congestion_control=htcp
correctly
sysctl -w net.ipv4.tcp_wmem=’8192 87380 16777216′
sysctl -w net.ipv4.tcp_rmem=’8192 87380 16777216′
the correct commands are:
# sysctl -w ‘net.ipv4.tcp_wmem=8192 87380 16777216’
# sysctl -w ‘net.ipv4.tcp_rmem=8192 87380 16777216’
Thanks for the tips.