Trying to troubleshoot a performance issue

Discussion in 'Tomato Firmware' started by davexnet, Jun 21, 2009.

  1. davexnet

    davexnet LI Guru Member

    Hello, I'm running a small utorrent setup - abut 100 connections.

    I noticed that going through the wrt54gl bandwidth seems constrained.
    For example, if I connect the PC directly to the cable modem, I get the
    speeds as set in utorrent, 300 down, 54 up.

    However PC>router>cable modem, with the utorrent speeds set the same,
    I get 300 down, but only 45 or 46 up. It never goes to 54.

    Except for setting my ssid key, and opening some ports in the router,
    the settings are as default. In the router conntrack page, it tells me 265
    connections are currently tracked.

    Any thoughts appreciated.
  2. davexnet

    davexnet LI Guru Member

    It's something to do with QOS. When I turn it off in the router,
    I don't get this problem.

    I turned it on, and set it to 496 on the qos/basic settings page.
    I have bulk traffic set to lowest. On the QOS/view graph page,
    I typically see something like the following:
    Highest 9 KBytes << what's using all this ? DNS lookup? This many?
    Lowest 52 Kbytes

    However, Utorrent is uploading at 47KB per second.

    Either I'm not understanding something, or it's out of whack somewhere.

    My upload BW , set by the ISP and verified by is 512 kbits,
    or just below. If I set Utorrent to 60KBytes and turn off QOS, it can maintain
    that speed. I'd like to upload at 55 Kbytes, but I can't attain it with QOS on.
  3. davexnet

    davexnet LI Guru Member

    This is what I see in QOS/view graphs.

  4. Toastman

    Toastman Super Moderator Staff Member Member

    It's likely that most of these connections are useless or expired. Make sure you have DHT turned off. Limit your uploads in uTorrent to 10kB/sec. If you are a standalone (single) user, you maybe don't really need QOS. But if you want to use it, you must learn how it works, and why the default settings are of little benefit. Read through this thread to get yourself familiar with QOS:
  5. davexnet

    davexnet LI Guru Member

    Toastman thanks for your response. I'm going to read your link to see
    how I can apply it my situation. Don't forget, this problem occurred on a router
    that had only recently been rebooted, and secondly the torrent system
    was very small - less than 100 connections. Conntrack reported less that 250

    10 KB upload is not enough for me to maintain my torrent ratio - I have
    to increase it, and I do so up to about 85% of my max.

    You said the default setting are useless. I'm going to read your article
    to see if I can figure out what you mean.
  6. Toastman

    Toastman Super Moderator Staff Member Member

    Re the 10k upload, I meant the uTorrent internal setting is limited in line with usual practice to maximise use of the outgoing bandwidth for actually downloading torrent files instead of seeding. If you allow 85% seeds you will not download much as seeding will take over.

    Some of what you will read will not apply - most of the time in multi-user environments we want to restrict P2P users, but you actually want to boost P2P. However the articles will still show you how to achieve what you want.

    Re the default QOS settings, they are almost useless as a method of identifying and controlling P2P. Very few tomato users use the defaults, instead we use a default class - and then set rules for everything we want to prioritise and let everything else drop "through" the rules into that default class.

    Good luck with your reading! If you have any questions on anything please reply on the QOS thread.
  7. davexnet

    davexnet LI Guru Member

    Well the p2p progs (as far as I can see) fall in to the "bulk" QOS class in tomato -
    using port 1024 and above. From this standpoint, they can at least be treated as
    a group.
    I don't necessarily want to prioritize p2p; I want it to run quickly, but I want the router
    to prioritize web browsing when it occurs.
    I can easily maintain 300 KB down 55 KB up with QOS turned off. (However
    with web browsing, you do notice an increased latency)

    The reason for my for my post here, is to find out why the upload slows down when
    I put it under control of QOS - even though the QOS class seems to have enough BW.
  8. Toastman

    Toastman Super Moderator Staff Member Member

    No, the default rules work differently. It has to IDENTIFY P2P and then place it in a class. But P2P applications will circumvent this by using other well known ports used by other services. Port 80 is a favourite of course. This approach has been shown not to work well countless times by many posters. You can get a more positive classification by treating ANYTHING you don't prioritise deliberately as "bulk" - this will include P2P.

    You must read through the QOS thread, which contains the answers. One immediate point - QOS cannot work unless you set the outgoing MAX BANDWIDTH correctly. Measure your outgoing speed at several times during the day. Find the minimum figure - for a 512k uplink this is likely to be rather less - for example mine is about 400k. Then set the LIMIT at 85% of this. Around 350k. This will allow QOS to work, but you won't attain the same speeds that you do using a modem. There is a penalty to pay for using QOS to manage your connections.

    Don't forget also the various timeouts in ADVANCED-CONNTRACK/NETFILTER. These are too long, and in most cases can be drastically reduced.

    Near the end of the QOS thread I posted a working QOS setup, if you copy that exactly, you should have something that works and use as a base for learning/tweaking.
  9. davexnet

    davexnet LI Guru Member

    Toastman - I thought, in general, that it was advised to use port-based rules
    Vs. L7 or ipp2p ? I know it's not perfect, but the following "bulk" rule must
    capture 85-90 % of the p2p traffic ?
    PS. I'm going to work through your article today. (I'll have more questions
    by tomorrow).

  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