lartc.org : Linux Advanced Routing & Traffic Control
(Category) (Category) lartc.org FAQ :
HTB Shaping rules
Some parameters explained :
  • burst and cburst : you need a minimal burst and cburst. If you don't specify this, htb will calculate the minimal burst of you.
  • quantum : this is the amount of bytes a class can send if it sends more data then it's configured rate. This must be greater then 1500 (MTU) and smaller then 60000. This can be overruled if you add a htb class.
  • r2q : this is used to calculate the quantum. By default this is 10. This can be overruled if you add a htb qdisc.
  • prio : this determines the order the classes can asks for more bandwidth from the parent after they send the configured rate. The lowest prio class also gets the lowest delays. But if a low prio class sends more data then the configured rate, the delays can go up.
To explain the shaping rules, we start with a basic htb setup (be warned, the rates and ceils are not choosen very well) :
      1
     / \
   10   20
   / \
 200 300
Settings :
1 : rate = ceil = 100
10 : rate = 50, ceil = 40
20 : rate = 50, ceil = 40
200 : rate = 70, ceil = 60
300 : rate = 70, ceil = 60

So 20, 200 and 300 are leaf classes = they have no child classes. And class 1 has a maximum of 100 due to the link limitation. So it really can't use more then 100.
stef.coene@docum.org

HTB shaping rules :
1 : (Answer) Ceil of a class : rate <= ceil
2 : (Answer) Ceil of the parent class : sum (rate of childs) <= parent ceil
3 : (Answer) Rate of the class : sum (rate of childs) <= parent rate
4 : (Answer) Rate of the parent class : sum (rate of childs) = parent rate
5 : (Answer) Ceil of root class : rate = ceil for root class
[New Answer in "HTB Shaping rules"]
Previous: (Answer) General shaping rules
Next: (Answer) root qdisc - class - qdisc - filter
This document is: http://qos.dyndns.org:3389/cgi-bin/fom?file=10
[Search] [Appearance] [Show This Entire Category]
This is a Faq-O-Matic 2.719.