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

QoS - Prioritizing traffic but not necessarilly limiting it?

Discussion in 'Tomato Firmware' started by the block, Aug 7, 2013.

  1. the block

    the block Reformed Router Member

    I'm a recent DD-WRT convert to Shibby's version of TomatoUSB and I'm loving it. Since this project seems very alive and well, I decided to go through every setting and try and tweak it to my heart's content, since I can see using this firmware for a long time and want it as personalized to my network as possible.

    I've gotten to the QoS section. I've gone ahead and set up classifications and have successfully identified and classified all my important traffic. Some of the defaults were good like the services, and the web traffic, and then I went ahead and added some of my own like identifying bittorrent & usenet traffic for example. I can watch the pie chart and everything is being identified as it should.

    Now came the process of shaping the inbound/outbound traffic. I don't want to particularly set hard limits on certain traffic with min & max percentages. Instead, I want everything to have the potential to max out the bandwidth, and instead scale down on its own based on the priority of the classifications I have in place.

    I'm using 6 classifications, top priority to low priority:
    1. Important Services
    2. VoIP/Skype/Web Conferencing/IM
    3. Web browsing & video
    4. Slingbox & other not-so-important services
    5. Default class for anything that isn't caught with rules
    6. Bittorrent/Usenet
    If I'm away at work and have Bittorrent/Usenet downloads/uploads going, I want them to saturate my bandwidth, unless perhaps I connect home at lunch to watch the Slingbox, then I want that to saturate my bandwidth. Or once I get home and want to browse the web, I want that to take the priority and scale everything below it back. The only way I see to do this is to assign defined bandwidth limits. The problem here lies if I have to set my Bittorrent/Usenet classification to only use 1-50% of the bandwidth for example, then it will never max out and my downloads and uploads will be slow all the time.

    Ideally I'd like to just keep everything at no limit and just let the classification priority list set the policy. Unfortunately I've tried this and it doesn't seem to be doing any good.

    Would anyone like to jump in here and tell me what it is I'm doing wrong, or if QoS can even work this way? I've never really used it before so I'm just going off of my basic understanding of it and the sites and forums I've found online searching for similar issues.

    Thanks
     
  2. Porter

    Porter LI Guru Member

    1. Keep in mind that the sum of the left values (in QoS/Basic Settings) in each direction must not exceed 100%.

    2. Set all the right values to 100%.

    3. Don't use "not limit".
     
  3. Frequenzy

    Frequenzy Networkin' Nut Member

    take note that QOS heavily depends on the outbound traffic so you need to make sure that the max outbound rate is set properly. you need to post your current QOS setting
     
  4. the block

    the block Reformed Router Member

    Thanks for offering to look at my setup.

    First of all here are my speeds after 5 Speedtests in a row:
    D:21.64 Mbps U:2.11 Mbps
    D:21.63 Mbps U:2.12 Mbps
    D:18.46 Mbps U:2.11 Mbps
    D:19.33 Mbps U:2.11 Mbps
    D:21.65 Mbps U:2.11 Mbps

    Average 5 Downloads: 20.542 Mbps (21.64 Mbps pretty consistently)
    Average 5 Uploads: 2.09 Mbps (2.11 Mbps pretty consistently)

    If I take 85% of 21.64 Mbps I get 18.394 Mbps or approximately 18836 Kbps. Should this be my Inbound Max Bandwidth Limit?

    If I take 85% of 2.11 Mbps I get 1.7935 Mbps or approximately 1837 Kbps. Should this be my Outbound Max Bandwidth Limit?

    I understand this isn't configured properly, but here is what I have right now. My QoS Basic Settings Page:
    [​IMG]

    My QoS Classification Page:
    [​IMG]

    Please let me know any suggestions you have for me in order to configure my QoS setup properly. Thanks a lot for taking the time.
     
  5. Porter

    Porter LI Guru Member

    Are you using ADSL? If you are using ADSL then 85% can be a bit risky because of the overhead.

    If you don't use ADSL, 85% are fine. You might even get a bit higher, but that's up to your experiments.

    The left values in your bandwidth settings must not add up to more than 100%!

    The L7 filters that catch traffic which uses port 80 need to be _before_ any port filter that matches port 80. Please put filter #11 on #23.
     
  6. the block

    the block Reformed Router Member

    I don't use ADSL, so I'll leave it at 85% for now until I get everything else tweaked, and then play with this again.

    I moved #11 to 23, thanks.

    Now as for the bandwidth settings, I really don't understand what these values mean. This is how I changed them so the left values didn't go over 100%:
    1-Services - 10% - 100%
    2-VoIP/IM - 20% - 100%
    3-Web/Vid - 20% - 100%
    4-Slingbox - 20% - 100%
    5-Default - 20% - 100%
    6-BT/NNTP - 10% - 100%

    For Web/Vid for example, does this mean that no matter what is going on, web traffic will be allocated at least 20% of the total bandwidth, up to 100%?

    What would be a smarter/more useful way of setting these limits?

    Thanks
     
  7. Porter

    Porter LI Guru Member

    The left values are the guaranteed rates. That way this class can't get starved, it will alsways be able to send/receive at least that much traffic.

    Webtraffic will get at least 20% if there is other traffic over your connection.
     
  8. the block

    the block Reformed Router Member

    Thanks, that clears it up for me.

    I've adjusted my percentages to what made a little more sense to me. Here's my latest QoS Basic Settings Page If you can think of a better way of doing it, I'm happy to hear:
    [​IMG]

    Lastly, I've measured my bandwidth since I made these changes. From when I posted originally, no QoS, these are my results:
    D:21.64 Mbps U:2.11 Mbps
    D:21.63 Mbps U:2.12 Mbps
    D:18.46 Mbps U:2.11 Mbps
    D:19.33 Mbps U:2.11 Mbps
    D:21.65 Mbps U:2.11 Mbps

    Now that I've setup my rate limits to D:18.394 Mbps and U:1.7935 Mbps, and the settings in the screenshot above, I get the following results which seems pretty consistent with the settings. This is at 85% of my total bandwidth.
    D:18.54 Mbps U:1.72 Mbps
    D:18.30 Mbps U:1.73 Mbps
    D:18.37 Mbps U:1.73 Mbps
    D:18.31 Mbps U:1.69 Mbps
    D:18.33 Mbps U:1.74 Mbps

    While what my 85% results have been have not been that bad, I'd certainly like to maximize my bandwidth so downloads finish faster, etc. What happens if I set the settings to 100% of my bandwidth instead? Reasons against doing this? Can I go up to 90%? 95%?

    Thanks
     
  9. Frequenzy

    Frequenzy Networkin' Nut Member

    you can try to set inbound rate to 95% and test. but for outbound it's strictly 85% or below.
     
  10. cloneman

    cloneman Networkin' Nut Member

    Looks like you're one of the few that has it right :). Classes on top steal bandwith from the bottom ones. They are limited by their maximum %, and also by any active application on the lower classes that has a defined minimum.

    As such, a good strategy is to give most classes 100% maximum, like you've done. I would use a more conservative maximum for:

    VoIP/Services: These require very little bandwith. The fact that they are on top already guarentees them priority, there's no need for 100% maximum; if an application gets misclassified as VoIP, it will be allowed to crush all traffic below it. You could set it as low as ~500kbps inbound max and you'd have room for 4 7.11u phone calls. That said, if you classify by mac address like you've done there's almost zero chance that something goes into VoIP by mistake.

    I'd put large downloads (512kb+) in the default class rather than in the Web class so browsing remains snappy when you're downloading a file.

    Finally, I would assign torrents to 90% max since they are a bit hard to control downstreamwise and this might help.
     

Share This Page