Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: How To: Tweak Linux for broadband

  1. #21
    Join Date
    Oct 2007
    Beans
    119
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How To: Tweak Linux for broadband

    Quote Originally Posted by doondoon View Post
    I'm still kind of new at this so how do you get to /etc/sysctl.conf to add the lines you mention and is it correct to assume you do that in the terminal instead of hunting the file. Can I put it anywhere in that file or am I replacing existing lines?
    I just added the number to the bottom of the existing file. I usually use nano to edit in terminal, or you can use gedit.

    Code:
    sudo gedit /etc/sysctl.conf
    the advantage with the stock settings seems to minimal, but I do see some increase, however, I still can't get over 200kbps on any download, etc. before the changes, i would never get over 185ish.

    J.

  2. #22
    Join Date
    Jan 2008
    Location
    Ohio
    Beans
    71
    Distro
    Ubuntu 13.04 Raring Ringtail

    Talking Re: How To: Tweak Linux for broadband

    Quote Originally Posted by Posh View Post
    I don't believe this will work as intended on machines with Edgy and beyond. From what I understand if you have tcp_moderate_rcvbuf = 1 (which is default) then the receive window is adjusted automatically. Now setting the max values could help but I'm not sure what setting the defalts do when you have tcp_moderate_rcvbuf enabled. Also I believe you will probably want to use net.ipv4.tcp_no_metrics_save = 1 instead of using the route.flush=1.

    Here is a website with some tuning tips
    Posh....thank you!!! Probably added 1/4 more speed!!
    Warprunner
    This is one race of people for whom psychoanalysis is of no use whatsoever.
    ...Sigmund Freud (about the Irish)

  3. #23
    Join Date
    Jan 2006
    Beans
    Hidden!

    Re: How To: Tweak Linux for broadband

    Quote Originally Posted by marioXXL View Post
    net.ipv4.tcp_wmem = 4096 87380 4194304
    net.ipv4.tcp_rmem = 4096 87380 4194304
    I've noticed that the tcp_wmem default value in the docs are a bit lower changing from 87380 to 65536

    Gentoo also has a nice little guide:
    http://gentoo-wiki.com/HOWTO_TCP_Tuning
    20" G5 iMac - AMD64 HP desktop
    http://www.ppclinux.info/

  4. #24
    Join Date
    Dec 2009
    Beans
    1

    Re: How To: Tweak Linux for broadband

    Several points to add to this thread, based on extensive testing at my employer.

    1. Bandwidth Delay Product is interesting but an insufficient minimum unless you intend to only run iPerf. Web browsing hits global servers - how do you know what latency to put in the formula?


      Even worse, there's a lot of latency at each end inside the server & client. Testing Linux-Linux on a US - Japan link showed:
      1. BDP was just under 500 KBytes based on ping time & throughput tests.
      2. Actual windowsize to achieve wire-speed throughput (13 seconds, including ramp-up) with 20 MByte file was 2.7 MBytes - 5x bigger than the textbook calculation.
    2. Longer, fatter pipes need even bigger rmem & wmem. My network ecologist colleague has been testing our regional (northeast US) GigE network and reports our standard 4 MByte max is inadequate. We've got some 10GigE pipes in plan - look forward to getting full value from those mothers. We don't throw away money on network - with proper planning leasing (not owning) these facilities is far less expensive than seeking smaller-capacity links.
    3. Modern computers measure memory in Gigabytes, and x64 Linux can use it well. Auto-tuning means the TCP stack takes only the memory it needs. Even if you define Gi-normous (technical term for really, really big) rmem & wmem the TCP stack will only grab the full measure when it's needed, and release it as soon as it's done.
    4. Set default mem values to about 128 KBytes. This means the auto-tuning requires fewer round-trips during ramp-up to reach optimum value. 16 KByte minimum seems OK.
    5. Selective Acknowledgments (tcp_sack = 1) are mandatory to maintain real-world throughput with that much data in flight. I've seen some misguided sites recommend disabling this feature.
    6. The easiest way to improve throughput? Defrag your hard drive. The receive buffer can't clear until that data is stuffed onto your hard disk. The longer your hard drive thrashes, the longer the sender must wait to transmit the next packets. Several years ago my old & slow single-core laptop signifcantly outperformed my colleagues dual core, fast-disk, large-memory machine simply because his disk was badly fragmented. His machine did outrun mine in the network tests after defragmentation.
    Conclusion - don't waste time with bandwidth-delay product calculations, simply specify 16 MByte max rmem & wmem.
    Last edited by NickFie; December 5th, 2009 at 12:15 AM. Reason: Add omitted information.

  5. #25
    Join Date
    Nov 2009
    Beans
    18

    Re: How To: Tweak Linux for broadband

    Hi NickFie,

    I got a 100mbps for my server, and wondering which settings should I be using.

    Just the following three?

    net.ipv4.tcp_sack = 1
    net.core.rmem_max =
    16 MByte
    net.core.wmem_max =
    16 MByte

    (The value should be in bytes, correct?)

    By the way, from a Google search, this trick has been floating around for a few years now. I am wondering if those have been implemented to the recent Ubuntu releases already, that we should better off using the default settings...

    I have read those interesting articles:

    Linux TCP Tuning - Linux 2.6 (link)
    TCP Stacks Testbed (link)
    Last edited by Falkor; December 23rd, 2009 at 02:06 AM.

  6. #26
    Join Date
    Sep 2009
    Beans
    329

    Re: How To: Tweak Linux for broadband

    Quote Originally Posted by kerry_s View Post
    It works on dsl too. Also the GUI(powertweak) version has been in the repos along time.
    What is the name of that program? I searched through the repositories and couldn't find anything resembling that......

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •