Tomato: Torrents kill other traffic Help!

Discussion in 'Tomato Firmware' started by Misato, May 18, 2009.

  1. Misato

    Misato LI Guru Member

    I have a serious issue and haven't been able to resolve it.
    Whenever I start torrents, other traffic (TCP) is impacted with or without QoS (on the upstream).

    Setup and Facts:
    1) With Tomato 1.19, disconnection occurs after a few minutes
    2) With Tomato 1.23, disconnection occurs after a few seconds
    3) Torrent software is capped at ~ 200 connections, DHT disabled, 10k/sec upstream and < 200k/sec downstream.
    4) Line connection is 7000kbps/500kbps
    5) QoS settings:
    Enable Qos x
    Prioritize ACK x
    Reset class when changing settings x
    Default class: Lowest
    MaxBW = 460
    Highest 80-100
    High 10-100
    Medium 5-100
    Low 3-100
    Lowest 2-95
    6) Since the default class is lowest, I've setup rules to tag specific traffic as highest, high, medium and low.
    7) Congestion control enabled or disabled (same problem)

    I've confirmed that the traffic tagged at a higher priority is indeed identified and tagged. However, whenever I start torrents, that traffic is still impacted. My upstream usage is also quite far from the maximum BW so I have no idea why my other traffic is dropped when torrents start.

    Can anyone help?
  2. chadrew

    chadrew LI Guru Member

    Have you tried increasing the Maximum Connections in Advanced > Conntrack / Netfilter? Increase them to at least 4096. Alternatively, reduce the number of connections that your torrent client makes in it's settings.

    The fact that you get disconnected when torrenting could mean you hit the maximum connection limit on your router.

    Also did you do a speed test and are sure that your upload is indeed 500kbps?
  3. Misato

    Misato LI Guru Member

    My max connections is 4096 and I am far from that number. Just at about 500 connections when I start getting the problem.
    The QoS upstream speed is accurate but this is irrelevant in this case since my current throughput is far lower than the set limit. With torrents running and capped, Tomato doesn't report much more over 200kbps of 460kbps.
  4. sigma

    sigma Addicted to LI Member

    Use the Victek MOD and see what happens...

    It was made of specially for P2P Offuscation, and managing of lots of simultaneous TCP Connections.

    I recommend to you add in your QoS filter the prioritation of ACK packets (SYN and RST works good for me as well).

    I have some settings in my conf, but i think the fresh instalation of the firmware will be sufficient... i like to add to you i have 10 machines at least working all with torrents and i havent see any issue so far.

    Im Running Thor MOD but Victek is the original piece of work.

    Keep it up. Greetings.
  5. Toastman

    Toastman Super Moderator Staff Member Member

    Using original Tomato or any of the mods with your applications should be a piece of cake. My money is on your QOS rules. Your lowest outbound setting allows too much P2P. Set to 10% and see what happens.

    Try copying exactly the basic QOS setup from this post and see if it works (use the second lot of figures to cut down torrents). If they don't allow your other applications to work, then you definitely have something else wrong! (That basic setup was tested here on WRT54GL with 79 clients, up to 9000 connections, with 12 P2P clients active. Fastest WWW pages still respond in 4 seconds, Tomato GUI in about 0.5 seconds). Read the complete thread for information on controlling P2P.
  6. chadrew

    chadrew LI Guru Member

    Good point. Personally I make my uTorrent use a set port and make my Tomato QoS recognize torrent traffic by that port.

    If you use Layer7 or IPP2P rules to recognize torrent traffic that might make your router work slower since your CPU will have to do more work with QoS.
  7. Misato

    Misato LI Guru Member

    Your settings make alot of sense but is not really applicable in my case.
    I get the problem with torrents using no more than 20KB/sec and a maximum of 500 connections.

    1) Since my torrent are capped at a low throughput in the torrent application, there is still roughly 30KB/sec free so the outbound is far from saturated. Why would other connections be affected?

    2) One observation is whenever I start newsgroup traffic or torrents, I notice the DNS outbound (highest priority) going as high as 15KB/sec. Now, I'm not entirely sure why this is happening since it shouldn't take so much BW to resolve hostnames but this COULD be the source of my problem. Can anyone advise?

    3) I even tried limiting lowest to 20% and the issue still occurred. Therefore it's obvious this has nothing to do with the amount of outbound BW used. It seems there is something else causing the drop of other connections.

    UPDATE #2:

    a) With torrents running, the QoS graph shows outbound throughput @ 5KBytes/sec under Highest even without any QoS ruleset tagging traffic at highest. 0 connections are classified under highest so I find this odd that some BW is lost under that priority.

    b) Disabling DNS Highest priority seems to resolve the disconnection. This seems a bit odd because DNS traffic should be minimal. Finally, my router is a WRT54G V2 with the old AMD chipset; would that cause an issue?
  8. Toastman

    Toastman Super Moderator Staff Member Member

    Quickly ...

    1) Read the QOS thread above through. There are many, many reasons.
    2) That's perfectly normal. Actually yours is on the low side if anything. Nothing to worry about.
    3) Not necessarily. Without seeing your QOS rules, I can't comment, and most of us on this forum also don't have the time to sit and think about poster's sets of rules and how they interact. That's why I recommend you try a know working set of rules that can cope with thousands of connections. If it works, problem solved. If not - then your problem lies elsewhere and not QOS.
    a] Many things use the highest class "behind the scenes", don't worry about it.
    b] Your router should not *disconnect* no matter how much DNS traffic. That's suspect behaviour. Is your modem capable of a large number of connections?

    *** I just added this screenshot - look at the "highest" classes. The DNS traffic depends on the numbers of new connections being opened at a given time, the 9000 conn. shot has actually less DNS traffic.

    Attached Files:

  9. Misato

    Misato LI Guru Member

    Disabling DNS made the connection stay up longer than before but eventually traffic was impacted....
    I'll try your config but if it doesn't work it may be my router. I just changed the modem last week and same thing.
  10. Toastman

    Toastman Super Moderator Staff Member Member

    Just added some screenshots above... Don't forget to change the settings in Advanced/Conntrack ....

    Good luck, hope it works out. Let us know what happens?
  11. Misato

    Misato LI Guru Member

    Your config generated the same issue.
    Swapped the router, same problem... sigh
  12. Toastman

    Toastman Super Moderator Staff Member Member

    Oh well. Reflash, erase NVRAM completely, try again. However, I suspect if you are using a modem of some kind, then the modem itself may not be able to handle the number of connections and eventually dies, resets and reconnects. Can you borrow another to try?
  13. Misato

    Misato LI Guru Member

    1) Already erased everything and reflashed
    2) Modem doesn't die because I have a ping script that pings google at all time and that's fine. I also replaced the modem recently by a different kind and same problem.
    3) It's definitely Tomato. As I mentioned, 1.23 is worse than 1.19. I'll go back and try 1.17.
  14. Misato

    Misato LI Guru Member

    OK, I think it's my ISP.
    I knew they had a throttle mechanism but didn't realize it would throttle and kill my other traffic.
    I guess this thread can be closed.... stupid Rogers!
  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