Optimizing for File transfers

Discussion in 'Tomato Firmware' started by Caldavien, Jun 17, 2007.

  1. Caldavien

    Caldavien LI Guru Member

    I recently purchased a WRT54GL and installed Tomato 1.07. I've done most of my basic configs already and its up and running fine. When I was looking for a router I read a review that had these notes in it :

    "Other Thoughts: The first thing I changed was the NAT table settings, increasing the table size from the default 512 to 4096, and dropping the NAT timeout from 3600 seconds to 90. In English this basically tells the router “store heaps of connection details, but discard them pretty sharpish if you don’t need them anymoreâ€, which is exactly the behaviour we want with Bittorrent and other P2P apps. The result? Bittorrent downloads are consistently 50-100kBps faster than I’ve ever had them, and web browsing is still possible with torrents running"

    Would you guys consider this to make sense and be true? and if so, what settings would I change to to accomplish this since I don't see settings with these names in current tomato firmware. The reviewer mentioned both Tomato and DDWRT so I don't know which he was using for this. Thanks in advance.
  2. mraneri

    mraneri Network Guru Member

    The settings are in advanced -> Conntrack/Netfilter

    I think Tomato is already setup pretty good, but if you want to play around, feel free.
  3. Caldavien

    Caldavien LI Guru Member

    I appreciate the feedback but that doesn't really answer my question. Any input on whether these settings would actually make a difference and what the sittings under that heading would need to be changed?
  4. mraneri

    mraneri Network Guru Member


    How many connections is your router tracking while you're torrenting? Are you regularly close to 2000? If so, up the limit. If not, it's not a big deal...

    I don't think you will get much benefit from adjusting the settings from the defaults. Try it. Write down the previous settings and you can always get back to where you were...

    There are no easy answers. Everyone likes their stuff set up differently.
  5. rcordorica

    rcordorica Network Guru Member

    I have given this some thought. In reality, most P2P traffic is UDP type packets. At least Bittorrent and Emule use UDP as the preferred method of communication, although there might be a way to force them to use TCP.

    In fact, looking at my QOS graphs right now, I see TCP being utilized for P2P because of an incorrectly configured inbound/outbound port for Emule on one of the clients, so perhaps TCP is a fallback method when the firewall is in the way. (Emules "LowID" mode)

    Bittorrent Tracker communication is probably TCP, but Azureus supports UDP tracking and Decentralized tracking (through UDP).

    What number is "NAT timeout" 3600 seconds? I haven't changed much in my conntrack settings, and I don't see this default. Tomato's default Conntrack is well thought out IMHO. It has conservative settings that should work for almost anyone unless you are reaching the 10K limit connection.

    You can raise the maximum total connections to 10K if you are running out of connections, and there should be no disadvantage:

    As far as Conntrack settings go, I only made slight aggressive changes to mine. I lowered the Close times to 6s (because if something asks for a Close, whats the point in waiting the default of 10s to close, unless you have 10s lag times).

    I increased my UDP assured to 185, and decreased Unreplied to 25.

    If you want the best performance, I'd recommend you overclock your router. Overclocking should increase its performance much more than whatever you can do in software. Routing connections is a realtime task which is best completed by a fast processor. A default 200MHz vs 240Mhz (on my WRT54GL1.1) means I got a 20% increase in speed just for overclocking. I can definitely feel it while web browsing.

    And finally, QOS is most important to force your web browsing experience to be fast, and regulate P2P to be a "background traffic" application.
    This thread is good:

    The search button is useful. :D
  6. rcordorica

    rcordorica Network Guru Member

    I take back my comment about Bittorrent being UDP. It turns out UDP transfer is a new option to Azureus, and most bittorrent traffic is TCP.

    So yes, adjusting TCP connection times will help, but only in the situation where you are reaching the upper limit of connections. It's only then when you want to make your TCP settings aggressive to get rid of old connections.

    A bigger point is that each application transfers data in a different way.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice