SUSE & openSUSE

Tips,Tricks, Tutorials,How Tos and Troubleshooting suse linux

Network Performance Fine Tuning in openSUSE & SUSE

Posted by admin on October 8th, 2008

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.

6 Responses to “Network Performance Fine Tuning in openSUSE & SUSE”

  1. ChungChen, Lin Says:

    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!

  2. idanka Says:

    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

  3. idanka Says:

    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

  4. idanka Says:

    correctly
    sysctl -w net.ipv4.tcp_wmem=’8192 87380 16777216′
    sysctl -w net.ipv4.tcp_rmem=’8192 87380 16777216′

  5. Firefox buggy during request - openSUSE Forums Says:

    [...] have any problem before when I was using Vista. Maybe it was because I meddled with things like this and tweaking some stuff in the about:config. I'm out of ideas. What is wrong here? Please help [...]

  6. paulo lellis Says:

    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.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>