Why does my Tomato web interface slow to a crawl after using Bittorrent? (uTorrent) -- Please help!

Discussion in 'Tomato Firmware' started by sofakng, Sep 14, 2007.

  1. sofakng

    sofakng Network Guru Member

    Before I explain my situation, I'll say that I think I had this same problem with DD-WRT sp1 (or was it sp2?). I'm not sure because I usually rebooted the router and it was fixed.

    Anyways, the problem I have is that once I start uTorrent on my Windows XP SP2 machine, the Tomato web interface slows to a crawl. That means when I click on [Ping] under the Tools menu, it takes 5 seconds to load. The same thing happens for the other options (eg. it takes 5 seconds [or more/less] to switch to any item in the Tomato web interface). However the Tomato interface always says its only using around 5% CPU (average) and 32% of the memory is free.

    After I stop uTorrent the interface USUALLY goes back to being lightning quick. Sometimes it takes a few seconds/minutes to go back to normal.

    The problem is really strange because when I uploaded a massive file (maxxing out my DSL connection), the web interface stayed really fast. The same thing when I downloaded a massive file.

    The problem definitely seems isolated to Bittorrent / uTorrent.

    Also, even when the web interface is going slow, it doesn't seem to affect existing connections. (eg. uTorrent stays at a consistent 83 Kbps upload speed [the max for 768 Kbps DSL] even when the Tomato interface slows down)

    I wouldn't care that the Tomato web interface slows down but it affects all of my other internet functions as well. (eg. ALL websites load very, very, very slowly until the Tomato web interface goes back to normal speed...)

    One last thing: I've tried enabling QoS but that didn't help....

    Can anybody please help me out? I really, REALLY like Tomato and hope I can get this fixed.
  2. Low-WRT

    Low-WRT LI Guru Member

    It's all the connections being used by the torrents. QOS, if set up correctly will definitely help. For a possible fix, try limiting the max connections to 2048 or 1024.
    Thats under advanced / conntrack
  3. sofakng

    sofakng Network Guru Member

    Thanks for the reply!

    Tomato defaults the maximum connections to 2096 (which is what mine is set to).

    Would QoS have any effect on my local connection to the router? I understand that it would affect packets on the WLAN (?) but not traffic between the router and my local machine. (eg. WLAN traffic is limited bandwidth, but my LAN traffic is essentially limitless [up to 100 Mbps anyways]).
  4. pharma

    pharma Network Guru Member

    If you do a forum search, you'll find some torrent issues resolved that are somewhat similar to your problem. I think it's related to how you have uTorrent setup. See if there are any settings within uTorrent related to memory management -- you might want to play with those.

    I use BitSpirit v. and have no problems downloading multiple torrents and surfing simultaneously. I do adjust some of the memory parameters found in BitSpirit.

    If all else fails, you should try another bittorrent client since the same issue happened to you in both DD-WRT and Tomato.

  5. sofakng

    sofakng Network Guru Member

    Thanks for the reply!

    I did do several searches about this issue and didn't find any that involved the Tomato Web GUI actually slowing down to a crawl.

    So you think the problem is isolated to my machine and not the router or DSL modem?

    If you theory is correct, then if I use uTorrent on my main machine, my secondary machine (laptop) should be able to access the Tomato Web GUI at normal (eg. "lightning-fast" speed), right?
  6. Toxic

    Toxic Administrator Staff Member

    best to limit connections via your bittorrent client as well. when you use QoS the data going through the WRT is being processed. this puts more stress on the CPU of the WRT. you are then opening up the webgui and trying to do more processes.

    when this is happeing and slowdown is being observed, telnet into your router. then type this command.


    you will see a list of processes that are running. top one will be the most CPU intensive and status shows "R" as Running.

    lowevering the amount of connections the BT client will handle will help the cpu of the WRT. Qos http should be set high. BT should be set to lowest.
  7. pharma

    pharma Network Guru Member

    It might be related to uTorrent ... as Toxic said you have to limit connections in your bittorrent as well. It sounds like you have yours set to unlimited connections -- in mine I have it set to 60 connections per job/torrent inbound, and 60 connections per job/torrent outbound. So if I'm download 3 torrents, that's 180 connections inbound, and 180 outbound.

    I'm also using IE 7, not sure what your browser is but it also might be a factor. You mentioned above it wasn't just the Tomato GUI affected, but also Web sites you visited. This makes sense if your maxing out your connections in your Torrent client.

  8. sofakng

    sofakng Network Guru Member

    Toxic, do you also think the problem is my machine and not the router?

    When I'm using uTorrent, Tomato is only reporting about 150 total connections...

    EDIT: Doh, pharma you posted while I was replying to Toxic.

    I'm not sure what my uTorrent settings are but I'll definitely check them when I get home.

    Does Windows XP SP2 have a maximum connection limit or something? ...or what is the limiting factor here? (eg. what is causing my problem?)

    My machine is very beefy (C2D E6600 @ 3.5 GHz, 2 GB RAM, etc) so I would think I could have a LOT of connections? (and as I mentioned, Tomato only reports about 150 TOTAL connections...)
  9. GeeTek

    GeeTek Guest

    Your torrent application consuming your entire out bound bandwidth is exactly the problem. This is the classic problem and symptom with all file sharing applications. Tomato's QOS system is the perfect cure to the problem. You need to limit the outbound torrent traffic to about 60% of the available bandwidth and make it a lower priority than any other traffic. There are numerous threads describing methods of accomplishing this, and I'll be happy to help out any way I can.

    Edit - Your "Bulk" QOS category is what typically catches the majority of torrent traffic. P2P will also catch some, but usually not as much as "Bulk". Those are the 2 QOS categories to work on.
  10. Toxic

    Toxic Administrator Staff Member

  11. sofakng

    sofakng Network Guru Member

    Ok, I've set uTorrent to 200 global connections, 50 connections per torrent, and 5 upload slots per torrent.

    I let uTorrent use maximum bandwidth (it's only uploading) and the Tomato Web GUI responded lightning-fast for several minutes! ...but then it started going very, very slow again.

    I telneted into the router, ran top, and it showed ksoftirq_CPU0 as my top process never going beyond 7.0% CPU. (it's usually between 3% and 6% it seems).

    Now I just set uTorrent to 40.0 Kbps (half my 768 Kbps speed) in the program and left for 30 minutes.

    Now the Tomato Web GUI is very, very, very slow (slower than before).

    The top program still shows 3% CPU as my top process. (and uTorrent is still set to 200 global connections / 50 per torrent)
  12. roadkill

    roadkill Super Moderator Staff Member Member

    do you have L7 classification configured?
  13. GeeTek

    GeeTek Guest

    150 connections is relatively few. As long as you do not consume the entire upload bandwidth, you can run upwards of 1,000 connections with no noticable degredation of service. Toxic is correct about using the torrent app to limit the connections and bandwidth. It is much more efficient than making the router do the work.

    Windows would not be a factor at all with the connection count of 150. You problem is very certainly the fact that you are allowing torrent to consume all of the uplink bandwidth.
  14. GeeTek

    GeeTek Guest

    40 Kbps is not half of 768 Kbps. Do you know what your downlaod and upload speed limits are ? You should turn off micro-torrent, reboot the router and then run a speed test at this website to see what your actual up/down limits are...

  15. sofakng

    sofakng Network Guru Member

    Thanks again for all of your help.

    Why do I still have the slowdown problem even when I configured uTorrent to only use 40 Kbps?

    I've done several speed tests and I get very, very close to my provisioned 3000/768. Most speed tests measure me at 740 or 760 out of 768 for upload.

    768 / 8 = 96 KB/s so 40 KB/s is actually less than half, right?

    Anyways, with the uTorrent global connection maximum at 150, the Tomato maximum connection at 2096 and uTorrent limited to 40 KB/s, what would still be causing my problem?

    I'm not doing anything else on my machine other than uTorrent, so I don't have any other p2p applications running.

    What else can be causing this? :( :( :(
  16. pharma

    pharma Network Guru Member

    Did you read any of the links posted by Toxic? It sounds like you need to do a little trial and error ...
  17. sofakng

    sofakng Network Guru Member

    Yes, I've read that page and I DID search the forums.

    It looks like the problem is isolated to just my uTorrent machine. For example, when the Tomato Web GUI is going very, very slow on my LAN computer it still goes lightning-fast on my laptop (WLAN) so I know the problem is isolated to the machine using uTorrent.

    I also understand QoS and that if my upload speed is maxxed out then with QoS no traffic can get through (that means DNS queries are slow, HTTP request/responses, etc).

    HOWEVER! I thought my LAN and WLAN traffic was NOT affected by my WAN traffic.

    Why would packets going between my uTorrent machine and my router go slow? That makes no sense because they are connected via a 100 Mbps *LAN* so the measely 760 Kbps going across my *LAN* has absolutely no affect on the LAN performance.

    The traffic DOES have an impact on the WAN performance since 760 Kbps is 100% of the upload bandwidth but it shouldn't affect my LAN/WLAN traffic.

    ...but do you see what I'm saying?

    I really do appriciate all of your help and you all seem frustrated so apparantly I'm not listening or not understand and for that I am sorry.

    One last question before I leave: Does QoS impact my LAN traffic as well as my WAN traffic? (eg. my router is "too busy" to talk to me on my LAN because it's dealing with WAN traffic or something?)

    Once again, thank you all for your help.
  18. GeeTek

    GeeTek Guest

    QOS only impacts WAN traffic, and will not have any effect on LAN to LAN traffic. You mention WLAN which I normally would interpret as Wireless LAN. Do you mean Wireless LAN by WLAN or were you referring to the WAN (Internet port) traffic ? A lot of times a full NVram clear will fix un-explainable problems. Have you done a full NVram clear lately ? Also, I am not following your word-diagram very well as to which computers are where. You have the micro-torrent computer connected by wire ? How many other computers do you have ? How do they connect to the router ? Wire or wireless ? Last, but not least, can you post some screen shots of the QOS "Basic Settings" and the QOS "Classification" screens ? When you look at the QOS graphs, which category are the torrent connections showing up in ? On the bandwidth realtime monitor, how much outbound bandwidth is indicated when you are having the slow down problem ?
  19. sofakng

    sofakng Network Guru Member

    [I'm sorry, I meant WAN in my above explanation. I've editted it to make more sense]

    Here is my setup:

    There are two computers and a router.

    Computer "Main" is wired directly to the router.
    Computer "Laptop" is wirelessly connected to the router.
    The router is a WRT54G running Tomato v1.07.

    Let's say I start downloading/upload torrents on "Main" and my WAN connection is 100% maxxed out.

    Now let's say I connect from "Main" to the router (the web gui).

    Shouldn't I be able to use the web gui at normal/lightning-fast speed?

    Sure, my WAN connection is maxxed out, but my HTTP connection from "Main" to the router shouldn't be affected at all, right?

    That is the part I'm not understanding. Why is my LAN traffic between "Main" and the router affected by my WAN traffic?
  20. GeeTek

    GeeTek Guest

    That is a whole nuther can of wermz. I have never encountered that scenario, but I agree that with the WAN maxed out, the router GUI should not be any slower than before. I know that computers themselves will get sluggish on their web browsing if they are waiting for something to finish. Sounds like it is the computer itself that is acting slow. A good way to determine that would be to max out the wan with the torrent PC and then see how the Tomato gui behaves for the laptop. I'll betcha it is nice and fast.

    Edit - Also, when the torrent PC is loading the Tomato GUI slow, how does it do with the rest of the www ? Probably just as slow ?! Am I the only one who has an imagination and fiddles with things ?
  21. sofakng

    sofakng Network Guru Member

    Ahh, I'm glad you understand what I'm saying. This is the scenario I was trying to describe the whole time. (apparantly not very well though!)

    You are correct in that the Tomato web gui is lightning-fast on my laptop even when my main computer is torrenting like crazy.

    The rest of the web is also very slow. All network traffic on that computer goes very, very slow. (even if uTorrent is told to limit it's traffic, it still slows down all network traffic on that machine). What do you mean by you have an imagination and fiddle with things?

    Anyways, now the question is why is my main computer slowing down LAN traffic because of uTorrent?

    My main computer is an dual-core 3.5 GHz (Intel C2D E6600) with 2GB of RAM. Some simple uTorrent traffic shouldn't be causing any problems at all.

    I'm also using Windows XP SP2 on the main computer.
  22. GeeTek

    GeeTek Guest

    Fraid I'm stumped. Good Luck.:dog:
  23. rcordorica

    rcordorica Network Guru Member

  24. sofakng

    sofakng Network Guru Member

    Thanks for the information!

    What does this patch do exactly? Are there any official patches from Microsoft (etc) that would do the same thing?

    I'm a bit skeptical about patching my operating system files from a website called LvlLord.de :)
  25. rcordorica

    rcordorica Network Guru Member

    Before XP SP2 there was no limit for outgoing connection attempts per second (64K). But microsoft changed it to 10 in SP2 as a way to slow down virus and worm propagation. Unfortunately it also has the side effect of slowing down P2P. This patch lets you change or remove that limit.
  26. pharma

    pharma Network Guru Member

    Many p2 clients will ask you if you want to change the max connection limit when they are installed. There is a way to see if this is the problem you are having -- go to the XP event log and look for 4226.

    Another tool you can use to change the limit is xp-antispy. The Special menu dropdown choice should provide an option to change the Connection Limit. However, keep in mind he is simply using the same method as the lvllord patch discussed above.
  27. sofakng

    sofakng Network Guru Member

    Well, I've applied the tcpip.sys patch after testing it for 10 minutes MY PROBLEM IS GONE!


    I've tried setting my tcpip.sys maximum connection limit to 2096 but LvlLord's patcher warned me about setting it above 100 so I reduced it from 2096 to 100.

    What's a reasonable number to have in there? 100?

    Thanks again for all of your help!!!
  28. pharma

    pharma Network Guru Member

    When I used XP I set mine to either 250 or 500 ... just fool around until you get the optimal setting for your setup.

  29. rcordorica

    rcordorica Network Guru Member

    personally i put 1000, but most connections cannot handle more than 100 outgoing connections per second without grinding to a halt. Remember though that Tomato to Browser connections and the reverse are not actually using bandwidth since they are all on the LAN. With Tomato's constantly updating GUI I can see why SP2's limit of 10 could be a problem.

    The old limit before SP2 was essentially no limit, 64K outgoing connections per second.
  30. Labtec

    Labtec Guest

    I had similar Problems, but i did it the other way around. A had my max. half-open TCP connections patched to "unlimited" using Xp-Antispy. (Wich is 16 Mio. connection for real). This was way too much for my Machine. I set it back to 50 Connections, and everything works great.

    I also moved my Pc a little bit away from the wall to improve my wireless radio reception, but i am sure the max. connections setting fixed it.
  31. ndoggac

    ndoggac Network Guru Member

    I think the common rule of thumb for patching xp sp2 is to set the number of connections to your upload rate in Kb/s. IE, my comcast account provides a 384 Kb upload rate, so I set my # connections to 384. It's worked for me for over a year now. Of course you have some torrent client settings that go along with that as well.
  32. quirK

    quirK LI Guru Member

    The tcpip.sys patch does not modify the total number of connections allowed. It allows the number of simultaneous negotiations of opening of connections at any one time. These are called half-open connections. Once the negotiation is successful and the connection is indeed open, it has nothing to do with the patch limit anymore.

    @sofakng: Just set it to 50 (patch default) or 100 (your current) and leave it. Then you can set the half-open connections value in utorrent to 40 or 80 respectively (80% of system limit).
  33. basmic

    basmic LI Guru Member

    I use that patch, and set the maximum connections to 1000 - from the default of 10.

    I suspect this will alleviate your problem.
  34. pharma

    pharma Network Guru Member

    He already used the patch .... see post #27 where he states it resolved his problem. I used a similar patch a while ago when I used Win XP and can definitely state it worked.

    Now I'm using a similar tcpip.sys patch for Vista SP1 RC and it also resolves the problem with the number of half-open connections -- I no longer get the "4226" tcpip errors and can download torrents, stream music, and surf the web simultaneously without any slowdowns.

  35. D_Reimer

    D_Reimer LI Guru Member

    quirK (post above yours) is correct. Don't confuse this as a connections limit. It's not. 50-100 is more than enough.
  36. Toastman

    Toastman Super Moderator Staff Member Member

    I notice the same problem - here I am in a residential block with 72 users currently. Always when I used uTorrent OR eMule I found that while I was swearing at Tomato for having slowed down, other residents were happily using their laptops at full speed right next to me. Our QOS works just fine. It was Windows that was the problem, in my case anyway. I upgraded to 2GB RAM and also did the " half-open connection " patch, that seemed to fix the problem.
  37. chomli

    chomli LI Guru Member

    in utorrent "options / advanced / net.max_halfopen" which value is there? try reduce it to 4
  38. fooker

    fooker Addicted to LI Member

    Although you have fixed your problem, i thought i'd post this as it might help someone out while doing a search for why their router is bogging down when using bittorrent.

    Didn't see this option mentioned here as an option to try. The problem with most torrent programs, is that they send out thousands of tcp syn packets to get the connections it needs to d/l. The problem is that alot of these don't get a response it hangs in the system. Default for this is about 190 seconds or so. This causes the ip_conntrack-table to get full. If you goto advanced > countertrack/netfilter page and put 3 in the syn sent box and then save it, that should solve your problems.

    I've had the same problem and when i made this change poof my router was back to running normally. By setting the timeout to 3 seconds, any syn packet thats sent out that doesn't get a responce in 3 seconds is dropped, and to be honest if it takes longer then 3 seconds to get a responce you will more then likely not get a response if you wait another 190 seconds or so. Hope this works out for you.
  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