1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom Startup Scripts to improve Bittorrent performance?

Discussion in 'HyperWRT Firmware' started by neoufo51, Jan 17, 2006.

  1. neoufo51

    neoufo51 Network Guru Member

    I have a question. Has anybody figured out a way to make it easy to users to create their own custom startup script according to their connection? For instance, I have a 6000/384k up connection and have utorrent running at optimal settings according to my connection software wise, but is there any place on the forum here or anywhere on the web (like a script itself of some sort) that would accept the values I put into it and spit out a custom startup script for me to use with the new Tofu 12 firmware? I would really be interested in this sort of thing and many people would enjoy it too.

    EDIT: I have used the one in the readme for tofu12 and I'm just wondering if it needs to be changed according to the connection.
  2. zaphod

    zaphod Network Guru Member


    the script dont need to be changed cause you got the same hardware... if you install more memory or use a GS-Version then you could use more concurent connections...

    more memory ---> more connections ---> better downloads ;-)


  3. NateHoy

    NateHoy Network Guru Member

    The script can be tuned according to your connection and needs, but it's not a matter of taking a few numbers and plugging in a script.

    The most important setting is the timeouts. But the right setting for those depends on what you are doing. If you make a lot of connections that don't have keepalive and you want them to stay stable, you want to set this to a larger number. If your goal is "pruning" the iptables as often as possible (because you have a LOT of torrents going), you can lower it. (second number in /proc/sys/net/ipv4/ip_conntrack_tcp_timeouts)

    The WRT54G series can easily handle 4,096 connections, though the Tofu limit is 2,048 and that works fine for me. If you find that your iptables are filling up (you reach a point where your computers have trouble making new connections), then you might want to consider expanding that (/proc/sys/net/ipv4/ip_conntrack_max). If you change that, you'll probably want to change the gc_thresh values so the router can target your new port counts properly and take advantage of all the new connection table entries.

    Note that as you increase the iptables and the thresholds, you may see impacts to performance from maintaining all these new connections and looking up data in your new larger iptables. That's the tradeoff. Your modem may also have trouble maintaining 4,096 open connections, so cranking this number up may work for some and hurt others.

    The final two settings (icmp*) just cut down on router load by ignoring specific types of data packets (ping requests and "bogus error responses").

Share This Page