using route command to alter TCP window size

Discussion in 'Linux Networking' started by WilliamREMOVEWyattTHIS, Aug 17, 2004.

  1. The 'route' command with a 'window' argument doesn't seem to work as

    I've got two Linux systems (one a 2.4, one a 2.6 kernel) on the ends of
    a long haul network. The rtt is ~ 68 millisec.

    The slowest link is 100 megabit, so to get the max possible performance
    I want to use the 'window' argument to route to bump up the TCP window
    size for that particular host-to-host transfer (rtt * 100 Mbit is

    I have altered the kernel var such as proc/sys/net/core/{w,r}mem_max to
    8 MB, the ../ipv4/tcp_{w,r}mem to a max of 4 MB so that the window size
    should get used.

    It never does, that is not by default. If I use a test program that
    calls setsockopt to ask for a 2 MB buffer, I get a 7 MB/sec or so rate,
    which approachs the top rate of 12.5 MB/s I might asymptotically ger. If
    I let it use the default sizez or alternatively, if I use FTP, I get
    about 900 kilbytes/sec.

    What am I doing wrong? When I did this with Solaris machines on either
    en, the equivalent Solaris route command does have the expected behavior
    of changing the default window size for connections to the target network.
    WilliamREMOVEWyattTHIS, Aug 17, 2004
    1. Advertisements

  2. WilliamREMOVEWyattTHIS

    P Gentry Guest

    man route again -- the window arg is meant for "shrinking" the window
    size in AX.25 (TCP/IP for ham radio operators).
    Wan? PPP? Intervening networks and/or routers? What's the physical
    make-up of this long haul network?
    I think you've confused these socket buffer space settings with TCP
    connection/header flags. They are inter-related re: connection
    performance, but changing the socket buffers will not automagically
    optimize the TCP window size (max 64KB) or window scaling (another 16
    bits used to scale the window size). The auto-tuning keeps improving
    but a few more tweaks are needed.
    Sounds more and more like you have a dedicated link connecting the
    And it sounds like you're familiar enough with the topic to ferret out
    the additional tweaks (though be warned FTP can be a bear, sometimes
    -- like NFS)
    You'll find many anomolies like this between Solaris and Linux -- same
    command, same switches but different behavior :-(

    You're not too far off the mark, I think. But with a dedicated link
    and apps you'll have to figure out the particulars -- we may be able
    to help here and there ;-)

    You can try here for a first go:
    You likely already have this:
    which gives an explanation of the variables in /proc/sys/net/xxx
    This is my standard perf reference (concise but pretty complete):
    and this may be of interest too:

    Just so you're aware:)
    "TCP window scaling and broken routers"

    Usually, I want to put a sniffer (ethereal) on the wire to see how the
    windows are are behaving -- and avoid at all costs a window size of 0

    To be honest it's been several years since I worked on this seriously
    and since you're running a 2.6.x kernel I'm not sure how performance
    has changed, but I think above should carry you a ways farther --
    you're on the right track ;-)

    email above disabled
    P Gentry, Aug 18, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.