Andreas, Since I understand your ASCII art and comments, I would very much appreciate it if you would draw what you see and criticize the following. Hopefully I''ll better understand after that! TIA, gypsy tc qdisc add dev imq0 root handle 1: htb default 20 tc class add dev imq0 parent 1: classid 1:2 htb rate 4522kbit ceil \ 4760kbit burst 16k cburst 16k quantum 1500 tc class add dev imq0 parent 1:2 classid 1:1 htb rate 4522kbit ceil \ 4760kbit burst 16k cburst 16k tc class add dev imq0 parent 1:1 classid 1:10 htb rate 2487kbit \ ceil 4760kbit burst 16k cburst 16k quantum 1500 prio 1 tc class add dev imq0 parent 1:1 classid 1:20 htb rate 2034kbit \ ceil 4341kbit burst 10k cburst 16k quantum 1500 prio 4 For the curious, here is the status info: Received on imq0: qdisc htb 1: r2q 10 default 20 direct_packets_stat 0 Sent 7826237 bytes 27128 pkts (dropped 0, overlimits 3929) qdisc esfq 20: parent 1:20 quantum 1500b perturb 20sec hash: classic Sent 5634125 bytes 4648 pkts (dropped 0, overlimits 0) class htb 1:1 parent 1:2 rate 4522Kbit ceil 4760Kbit burst 16Kb cburst 16Kb Sent 7826237 bytes 27128 pkts (dropped 0, overlimits 0) rate 1728bit 4pps lended: 1954 borrowed: 0 giants: 0 tokens: 39532 ctokens: 37555 class htb 1:10 parent 1:1 prio 1 rate 2487Kbit ceil 4760Kbit burst 16Kb cburst 16Kb Sent 2192112 bytes 22480 pkts (dropped 0, overlimits 0) rate 1576bit 3pps lended: 22480 borrowed: 0 giants: 0 tokens: 71878 ctokens: 37555 class htb 1:2 root rate 4522Kbit ceil 4760Kbit burst 16Kb cburst 16Kb Sent 7826237 bytes 27128 pkts (dropped 0, overlimits 0) rate 1728bit 4pps lended: 0 borrowed: 0 giants: 0 tokens: 39532 ctokens: 37555 class htb 1:20 parent 1:1 leaf 20: prio 4 rate 2034Kbit ceil 4341Kbit burst 10Kb cburst 16Kb Sent 5634125 bytes 4648 pkts (dropped 0, overlimits 0) rate 184bit lended: 2694 borrowed: 1954 giants: 0 tokens: 54849 ctokens: 41180
Andreas Klauer
2006-Mar-06 00:20 UTC
Re: ATTN Andreas Klauer: ASCII art + comments, please?
On Sun, Mar 05, 2006 at 02:33:17PM -0800, gypsy wrote:> Since I understand your ASCII art and comments, I would very much > appreciate it if you would draw what you see and criticize the > following. Hopefully I''ll better understand after that!Uh, right. Don''t take anything I say for granted, though.> tc qdisc add dev imq0 root handle 1: htb default 20 > > tc class add dev imq0 parent 1: classid 1:2 htb rate 4522kbit ceil \ > 4760kbit burst 16k cburst 16k quantum 1500 > > tc class add dev imq0 parent 1:2 classid 1:1 htb rate 4522kbit ceil \ > 4760kbit burst 16k cburst 16k > > tc class add dev imq0 parent 1:1 classid 1:10 htb rate 2487kbit \ > ceil 4760kbit burst 16k cburst 16k quantum 1500 prio 1 > > tc class add dev imq0 parent 1:1 classid 1:20 htb rate 2034kbit \ > ceil 4341kbit burst 10k cburst 16k quantum 1500 prio 4First, here is what I see: 1: HTB root qdisc (default 20) | \--- 1:2 HTB root class (4522kbit/4760kbit) | \--- 1:1 HTB class (4522kbit/4760kbit) | \--- 1:10 HTB leaf class (2487kbit/4760kbit) \--- 1:20 HTB leaf class (2034kbit/4341kbit) Now on to the criticising; the root class has a higher ceil than rate. However, different rate/ceil makes only sense if there is someone to borrow bandwidth from, which is not the case here. The root class acquires bandwidth directly from the QDisc, which has unlimited resources, as the root class itself is supposed to be the limiting factor. So what you have here should practically be no different from a 4760kbit class. The 1:1 class seems to be useless; it has exactly the same settings as it''s parent, except for quantum, which is not explicitely set. Furthermore, it does not have any siblings. Does not make sense to me as such a class will just use exactly the same rate as it''s parent. Compare the statistics of these two classes below.> class htb 1:1 parent 1:2 rate 4522Kbit ceil 4760Kbit burst 16Kb cburst > 16Kb > Sent 7826237 bytes 27128 pkts (dropped 0, overlimits 0) > rate 1728bit 4pps > lended: 1954 borrowed: 0 giants: 0 > tokens: 39532 ctokens: 37555 > > class htb 1:2 root rate 4522Kbit ceil 4760Kbit burst 16Kb cburst 16Kb > Sent 7826237 bytes 27128 pkts (dropped 0, overlimits 0) > rate 1728bit 4pps > lended: 0 borrowed: 0 giants: 0 > tokens: 39532 ctokens: 37555As for the leaf classes, their rates are fine (add up to the parent class rate), except that the parent actually can use 4760kbit rate rather than 4522kbit. Their priorities are questionable; using 1 and 4 here should not be any different from 1 and 2 or 3 and 6 or 0 and 1. It''s one high- and one low-priority class either way. I would probably set a priority just for the low priority class, so that it becomes more obvious what is intended by this setting here. That what you wanted? Regards Andreas Klauer
Andreas Klauer wrote:> > On Sun, Mar 05, 2006 at 02:33:17PM -0800, gypsy wrote: > > Since I understand your ASCII art and comments, I would very much > > appreciate it if you would draw what you see and criticize the > > following. Hopefully I''ll better understand after that! > > Uh, right. Don''t take anything I say for granted, though.Understood.> > tc qdisc add dev imq0 root handle 1: htb default 20 > > > > tc class add dev imq0 parent 1: classid 1:2 htb rate 4522kbit ceil \ > > 4760kbit burst 16k cburst 16k quantum 1500 > > > > tc class add dev imq0 parent 1:2 classid 1:1 htb rate 4522kbit ceil \ > > 4760kbit burst 16k cburst 16k > > > > tc class add dev imq0 parent 1:1 classid 1:10 htb rate 2487kbit \ > > ceil 4760kbit burst 16k cburst 16k quantum 1500 prio 1 > > > > tc class add dev imq0 parent 1:1 classid 1:20 htb rate 2034kbit \ > > ceil 4341kbit burst 10k cburst 16k quantum 1500 prio 4 > > First, here is what I see: > > 1: HTB root qdisc (default 20) > | > \--- 1:2 HTB root class (4522kbit/4760kbit) > | > \--- 1:1 HTB class (4522kbit/4760kbit) > | > \--- 1:10 HTB leaf class (2487kbit/4760kbit) > \--- 1:20 HTB leaf class (2034kbit/4341kbit) > > Now on to the criticising; the root class has a higher ceil than rate. > However, different rate/ceil makes only sense if there is someone to > borrow bandwidth from, which is not the case here. The root class > acquires bandwidth directly from the QDisc, which has unlimited resources, > as the root class itself is supposed to be the limiting factor. So what > you have here should practically be no different from a 4760kbit class. > > The 1:1 class seems to be useless; it has exactly the same settings > as it''s parent, except for quantum, which is not explicitely set. > Furthermore, it does not have any siblings. Does not make sense to > me as such a class will just use exactly the same rate as it''s parent. > Compare the statistics of these two classes below. > > > class htb 1:1 parent 1:2 rate 4522Kbit ceil 4760Kbit burst 16Kb cburst > > 16Kb > > Sent 7826237 bytes 27128 pkts (dropped 0, overlimits 0) > > rate 1728bit 4pps > > lended: 1954 borrowed: 0 giants: 0 > > tokens: 39532 ctokens: 37555 > > > > class htb 1:2 root rate 4522Kbit ceil 4760Kbit burst 16Kb cburst 16Kb > > Sent 7826237 bytes 27128 pkts (dropped 0, overlimits 0) > > rate 1728bit 4pps > > lended: 0 borrowed: 0 giants: 0 > > tokens: 39532 ctokens: 37555 > > As for the leaf classes, their rates are fine (add up to the parent > class rate), except that the parent actually can use 4760kbit rate > rather than 4522kbit. Their priorities are questionable; using 1 and 4 > here should not be any different from 1 and 2 or 3 and 6 or 0 and 1.The four is a "leftover", but I want it clear that 1:10 has priority over 1:20.> It''s one high- and one low-priority class either way. I would probably > set a priority just for the low priority class, so that it becomes > more obvious what is intended by this setting here. > > That what you wanted? > > Regards > Andreas KlauerThank you. Yes, that is exactly what I wanted. It was also every bit as understandable as I expected, so THANK YOU again. I thrashed with this because when I set it up with only a 1:1 (where 1:2 is now), NOTHING ever was recorded in the root and no borrowing would occur. The more I thrashed, the more confused I became. With this, I think I can fix it. -- gypsy