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

QoS xxx% ~ yyy% help can someone elaborate

Discussion in 'Tomato Firmware' started by luckman212, Dec 17, 2008.

  1. luckman212

    luckman212 LI Guru Member

    hi,
    in tomato QoS, under the QoS-Basic settings section
    you fill in your max upstream bandwidth and then below are all the rows for each class and how you want to divide up the bandwitdh. so far so good.......

    what I am confused about is what the numbers in the 2 drop down menus actually MEAN. so for example, let's say I have 1000mbit upstream.

    If I enter

    Highest 90-100% = 900-1000kbit
    High 75-100% = 750-1000kbit
    Medium 50-95% = 500-950kbit
    Low 10-90% = 100-900kbit
    Lowest 5-50% = 50-500kbit

    does that mean that the "highest" class gets reserved the top 100kbit *only* (e.g. it can only consume 100k of bandwitdh??) or does it mean that no matter WHAT is happening, the HIGHEST class will ALWAYS get a minimum of 900-1000kbit of bandwidth (and whatever else is left gets passed on to the lower classes). If anyone can point me to a wiki guide or FAQ that covers this in more detail I would be greatly appreciative!!
     
  2. az2008

    az2008 Addicted to LI Member

    This page says it's an allocation, not a prioritization: http://en.wikibooks.org/wiki/Tomato_Firmware#QoS

    My understanding of this is that the maximum percentage just says which classes can consume all available bandwidth *when it's available*. I might want to cap my torrents at 20%. But, if I walk away from the computer for a few hours, why not let it run at 100% if nothing else is using bandwidth? In that case, I would specify the class for torrents to have a max percentage of 100%.

    The minimums are where the rubber meets the road, and what would keep any class's maximum from being reached.

    And, based on the wording of that wiki article, I think the minimums are just allocations. So, if the total of all minimums exceed 100% (as your example does), and traffic for each of the classes exceeds the class's minimum, then it wouldn't be possible for *all* the minimums to be met. They would all be reduced equally as necessary to stay below the "Maximum bandwidth." I.e., it wouldn't reduce the minimum of Lowest first (or more greatly).

    I don't know for sure if that's how it would handle that situation. I'm speculating that's how it would work based upon the wording of the wiki.

    It's an interesting question how that condition should be handled. I don't think the router should arbitrarily give preference to one stated minimum over another. If I wanted that, I should raise the minimum (and not cause the sum of minimums to exceed 100%). But, I can also see how "Highest" is implied to be higher priority than "Lowest." So, maybe it should preserve more of the minimum for "Highest" than for "Lowest" (when total traffic is such that none of the minimums can be met, because their sum is greater than 100%).

    I don't know.

    Mark
     
  3. luckman212

    luckman212 LI Guru Member

    Thanks for the insight. That makes sense what you're saying. I have adjusted my percentages accordingly, and they are now like this:

    [​IMG]

    From what I understand, the numbers above would allow the "highest" class to saturate 60% (it's minimum) while still allowing the other classes to also saturate their minimums. So let's say I have 1000kbs upstream. Highest class is pushing 850kbit let's say, But there is app in "high" class that is pushing 340kbit. Well that is too much, it has to throttle back....... so it would allocate 75% (750kbit) to the HIGHEST class, leaving 250kbit "available", that it can give to the HIGH class, which still falls within it's 25% minimum. If someone in "medium" class starts talking, lets say he wants to push 200kbit, well since "HIGH" class is already at its MINIMUM of 25%, he cannot borrow from HIGH class, but HIGHEST is pushing 750kbit which is 75%, so he has a little to spare because his minimum is actually 60%. So he can drop down to 600kbit (=60% minimum) and give 150kbit to the MEDIUM class. Now MEDIUM class is pushing 150kbit which is 15%, totally fine for his 10-95% specification.

    Is this a fair assessment of how this system is supposed to work?
    My rudimentary tests indicate that it works well set up this way. I did some tests with my Voip and the quality was good~excellent even during torrenting and/or uploading FTP, sending mail etc.

    I am interested in others' results to confirm......... :biggrin:
     
  4. az2008

    az2008 Addicted to LI Member

    I believe so. Reading the rules literally, that's how I would interpret them to work.

    It's always possible that Tomato has some kind of intelligence to give more weighting to higher classification regardless of the literal percentages.

    The best illustration of what I'm imagining is when the sum of the minimums exceed 100%. Does Tomato take equally from all the minimums to output 100% of the bandwidth? Or, does it some algorithm to recognize that the minimum for "Highest" is vastly higher than the others, and therefore should be adjusted downward vastly less (as it tries to accommodate all the overstated minimums)?

    I overstate my minimums (the sum is greater than 100%). I never thought about what happens when outbound is saturated until you asked those questions. I never really thought about why I overstated them, or if there could be negative effects. :)

    My reasoning for overstating minimums was that, when there's only High and Highest traffic, I want Highest to have 90%. But, when there is other, lower traffic, I don't mind them dragging down Highest.

    Now that I think about it, that's probably stupid because if I just set the minimums accurately, so they sum to 100%, it should be the same effect because they can all run to 100% when competing traffic is low.

    So, it sounds like that's the important question. Whether Tomato applies any weighting when it adjusts overstated minimums downward. If it does, that might be a reason to overstate the minimums. But, if it takes away from each equally, then overstating them serves no purpose.

    Mark
     
  5. Toastman

    Toastman Super Moderator Staff Member Member

    I agree with az2008's interpretation of the wiki. There is a consensus of opinion that says that the sum of all the "rate" settings should add up to 100% and that there is no point in doing otherwise as it will "break" QOS.

    In practice, if this is followed, then a quick test of one of the high priority classes very quickly reveals that it actually isn't having the effect that one would have hoped. In my case, WWW response on my favourite test page becomes quite poor - 7 to 25 seconds, in the presence of a lot of P2P users.

    For instance, if a setting is made for WWW in HIGH class, of, let's say, 10% rate and and 50% limit - then the initial allocation for that class should be 10% rising to 50% max. This **should** be quite adequate to contain the WWW traffic, but in practice, performance suffers a very big hit - pages open quite slowly, between 7 and 25 seconds.

    If the settings are replaced with 100% rate and 100% limit, the page becomes fast, 3-4 seconds to retrieve. It appears to be the "rate" setting that is responsible.

    So what is the explanation? Is the initial WWW query in excess of the initial rate of 10% - resulting in a delay while QOS is adjusted upwards? If so, then a higher setting of say, 50% rate and 100% limit might be more logical. But applying this rate to 5 classes results in 250% - and 10 classes (used in tomato) becomes 500%. Clearly something has to accommodate these requirements. It might break the rules, but it is necessary to get QOS to work.

    I had also always assumed that Tomato must handle this "overstating" of rate allocations, by adding up all of the "rate" settings and dividing to keep the total to 100%. My belief was based on what I had read in the forums and wikis - however, probably most of these posts were subjective assumptions too.

    One can postulate that if the router is switched on from cold, then a WWW session is started, the initial allocation of 50% is fine. And that if a mail session, also taking 50%, simultaneously begins, then our 100% is now filled. After this, any more new classes will exceed the 100% and then Tomato would have to downsize the allocations. This makes sense and appears to fit the observed behavior. How is this achieved in practice?

    Perhaps if someone on the forum is able to read the source code and unravel the logic behind it, we might gain more understanding.
     
  6. az2008

    az2008 Addicted to LI Member

    That would be really helpful.

    I've been thinking about this further, and I'm leaning in the direction of your opinion, that overstated minimums aren't just reduced equally so their sum equals 100%. For one thing, that could lead to lower priorities (with lower percentages) going to 0%. That doesn't sound right. If the logic prevents that from happening, then there must be something dynamic/flexible occurring.

    If it really does adjust all minimums down equally, then it seems to me like Tomato shouldn't allow a user to specify a sum of minimums > 100%. Then it would be clearer.

    Whatever Tomato does (even if it's unexplainable), I don't want to see it changed. It works great for me.

    Mark
     
  7. Toastman

    Toastman Super Moderator Staff Member Member

    QOS rate and limit settings

    az2008

    Yes, the QOS does work, and works well. But I am an engineer with a background of working with mission-critical industrial process control, and I personally like to know that everything is working properly according to a precisely defined set of rules. It aggravates me when I don't know what those rules are, and have to waste several thousand hours guessing!

    Perhaps the downsizing is dynamically adjusted down to 100% each time a new class is invoked?

    Pass....! Anyone knowing the answer too that one, please help!

    Having said that, Tomato can be made to be more effective than many Enterprise-level routers, which often need a rocket scientist to set up. I'll try to provide some "food for thought" soon with a few articles - the posts will be in the form of informal tutorials and might be quite large - keep watching !
     
  8. Toastman

    Toastman Super Moderator Staff Member Member

Share This Page