Networking [SOLVED]: HTB Traffic shaping in Linux – change quantum of a class

Networking [SOLVED]: HTB Traffic shaping in Linux – change quantum of a class

Home Forums Networking Networking [SOLVED]: HTB Traffic shaping in Linux – change quantum of a class

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34539

    Anonymous

    QuestionQuestion

    I am using Linux HTB to shape traffic, I am able to achieve the bellow diagram. The problem arise when I want to change the allocation for the excess bandwidth, instead of giving each class its proportion from the excess bandwidth, I’d like to be able to give first application 10% of excess bandwidth instead of 50%

              - Root - 200kbps
             /   |    
            /    |     
           /     |      
          /      |       
         /       |        
        /        |         
    100kbps    60kbps     40kbps
    app1       app2       app3
    

    It appears HTB already does it:

    When more classes want to borrow bandwidth they are each given some number of bytes before serving other competing class. This number is called quantum. If several classes are competing for parent’s bandwidth then they get it in proportion of their quantums.

    If I understood correctly, when 2 classes compete for parent bandwidth, each one is served a number of bytes according to his quantum, then the rest is distributed proportionally to their original allocation. (Correct me if I am wrong).


    I thought I could give each class percentage of the excess bandwidth by changing its Quantum (i.e. chaning r2q global)

    HTB chooses precomputed quantum values. It computes classe’s quantum (when added or changed) as its rate divided by r2q global parameter.

    But unfortunately, when I add a new class I am unable to change the r2q, it seems it can only be overrun for the root.

    How can overrun the quantum for each inner class ? (if possible) ?

    #34540

    Anonymous

    Accepted AnswerAnswer

    You cannot override the r2q for different classes, because this is a global value for every HTB qdisc, but you can specify the quantum value for every class in bytes. In this case the specified quantum value will be used, not calculated from rate and r2q values.

    Source: https://serverfault.com/questions/885407/htb-traffic-shaping-in-linux-change-quantum-of-a-class
    Author: Anton Danilov
    Creative Commons License
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.