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

QOS - getting tired of it

Discussion in 'Tomato Firmware' started by basmic, Jun 18, 2008.

  1. basmic

    basmic LI Guru Member

    How I would like things:

    Basically my machine, has 24/7 torrent access - and I'd prefer it to stay like that. These don't have priority - out of approx 50kb/sec (400kbit) upload, I only want to allow 20kb/sec for torrents.

    I want Unreal Tournament to have highest priority - no matter what, I don't want ping spikes because of a torrent. :thumbdown:

    From then on, emails and http access can have higher priority over torrents, but lower access than UT.

    Ideally I'd like to restrict another machines upload bandwidth, but that would be just a bonus.


    How things really are:

    Currently, after uTorrent has been chugging away (currently with one large torrent), UT, email and http access can be very sluggish. I close uTorrent for an hour, load it back up, and all seems to be well again.

    Obviously this is not ideal. The situation will worsen as I download more torrents simultaneously, because the torrents seems to saturate my entire upload bandwidth, although I have told QOS to use only about 33%.


    Why?

    So why is all the above happening? I would usually run Netlimiter, but I want to learn a little about QOS - even it at the expense of my internet connection right now. :tongue:

    Here are a few screenshots, which I hope will help with my QOS diagnosis:
    [​IMG]

    [​IMG]
     
  2. Kiwi8

    Kiwi8 LI Guru Member

    For a more targetted control of uTorrent's traffic, I suggest setting uTorrent to use only a single outgoing port and setting that port in Tomato.

    This is what I did in Tomato:

    TCP/UDP
    Src Port: 40000 (substitute 40000 for the port that u use)

    Class: Lowest
     
  3. FRiC

    FRiC LI Guru Member

    You can also probably try to uncheck the two prioritize options you have checked, and also play with the TCP Timeout in Advanced/Conntrack.
     
  4. basmic

    basmic LI Guru Member

    Added the following to my Classification settings: TCP/UDP Port: 34107,34117 Lowest Torrents

    We'll see how that goes. Is UDP the upload port, and TCP outgoing - ie: TCP is Internet > Router > Computer, and UDP is Computer > Router > Internet?

    I never knew, so just set it as TCP/UDP. :p
    I'm clueless as to what they do - I think they were set like that as default, so I just left them. Is there some guide explaining all the settings? :confused:

    As for TCP Timeout - again, I'm clueless. :redface:
     
  5. ipse

    ipse LI Guru Member

    Basmic: I found the hard way that I had to put QoS on INCOMING traffic as well.
    My case was similar: I had a particular IP set for highest class (an MP3 streaming appliance) and it would drop connections when I was doing HTTP file transfers (downloads) although HTTP is set to HIGH only.
    Only after touching Incoming QoS I solved the problem by allocating limited b/w to each class...even if this means I will never get the "theorethical" max download speeds anymore.

    Hope this helps...I'm not at home now to post screenshots of the QoS config, but it's basically derived from the examples posted in this forum (search for Inbound QoS).

    One thing I have been struggling with (might make a difference in your case) is "Prioritize ACK"...in my case I decided that I should leave this Checked, but a lot of people seem to agree that for Bit Torrent it's better to leave it Unchecked (many connections...little data...lots of ACKs).

    Take care.
     
  6. vexingv

    vexingv LI Guru Member

    As has been said many times on this forum, there's really no way to prioritize INBOUND traffic. The acknowledge packets provide some tweaking, but I really don't understand that all too well myself. I recall reading something regarding the nature of torrent traffic and how it isn't as forgiving on network traffic even w/ QOS.

    Anyway, I noticed that you didn't set a downstream cap for any traffic classes. Essentially, you're suffocating your incoming traffic. While still inefficient, this is really the only way to regulate downstream bandwidth. Even w/ upstream QoS, you're going to need to cap downstream bandwidth otherwise there's constant competition between what gets in. In my case, I had background nntp traffic that had full access to downstream bandwidth. This made everything a bit sluggish especially games. It wasn't until I capped nntp traffic that I got closer to my normal pings (from 400+ ms w/ uncapped traffic to 40-50 ms when traffic was capped) and websites loaded more seamlessly. Of course, your latency will probably still be a bit higher (maybe 10-15 ms) than if you had zero background traffic. My suggestion is to cap to ~85% of your downstream bandwidth. Experiment by loading some traffic and then pinging some servers you play on. Then you'll be able to find a balance between how slow you want your downloads to go and how fast your latencies are.

    Also, I'd suggest leaving some margin on the upstream (you have it @ 100%). If 375 kbits (really? 10M down but only 300K up?) is indeed your line's max upstream, I'd either type in 90-95% of 375 or set classes to max out at 95%. From my experience on DSL, if the upstream ever hits its maximum, downstream speeds are going to plummet.

    And if you're still unsatisfied, use the utorrent's own options to regulate bandwidth.
     
  7. esaym

    esaym LI Guru Member

    I see a few places where you are confused.

    I helped develop a similar QOS program for a linux firewall distro once: http://community.smoothwall.org/forum/viewtopic.php?p=164920
    To my knowledge the one for tomato also uses HTB.

    FYI almost games use the UDP protocol for communication for online play (except World of Warcraft; you are screwed). There for it is very easy to just add a single class for UDP packets at the top of your list and give it highest priority. Therefore you can remove your unreal tournament class all together because all udp will be prioritized.

    Your other classes look aright, I would remove the udp out of them since it will already be taken care of. Web apps and p2p use a very small amount of udp anyway, not enough to hurt any thing.

    And another FYI. Where you have "default class" = lowest up there at the top, what that means is any unclassified traffic will go into the class "lowest". Therefore if that is the case you really don't need to have your bulk traffic class because it is already taken care of, so you can delete that one too.

    The only problem I see is you upload speed. I don't know what your cap is but you are going to have to set your limit to 90-85% of your cap. If you don't know what you cap is (and some isp's lie!), then run an online speed test and use the average of your results.

    I don't use my tomato WRT54G much, but did set up the QOS on it once and found it to work well, I did not have any ping or lag issues.
     

Share This Page