HTB accuracy for high speed

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <netdev@...>, <jarkao2@...>, <kaber@...>, <davem@...>, <devik@...>
Date: Friday, May 15, 2009 - 10:49 am

Hi!
I've been using HTB in a Linux bridge and recently I noticed that, for
high speed, the configured rate/ceil is not respected as for lower
speeds.
I'm using a packet generator/analyser to inject over 950Mpbs, and see
what returns back to it, in the other side of my bridge. Generated
packets have 800bytes. I noticed that, for several tc HTB rate/ceil
configurations the amount of traffic received by the analyser stays
the same. See this values:

HTB conf      Analyser reception
476000Kbit    544.260.329
500000Kbit    545.880.017
510000Kbit    544.489.469
512000Kbit    546.890.972
-------------------------
513000Kbit    596.061.383
520000Kbit    596.791.866
550000Kbit    596.543.271
554000Kbit    596.193.545
-------------------------
555000Kbit    654.773.221
570000Kbit    654.996.381
590000Kbit    655.363.253
605000Kbit    654.112.017
-------------------------
606000Kbit    728.262.237
665000Kbit    727.014.365
-------------------------

There are these steps and it looks like doesn't matter if I configure
HTB to 555Mbit or to 605Mbit - the result is the same: 654Mbit. This
is 18% more traffic than the configured value. I also realise that for
smaller packets it gets worse, reaching 30% more traffic than what I
configured. For packets of 1514bytes the accuracy is quiet good.
I'm using kernel 2.6.25

My 'tc -s -d class ls dev eth1' output:

class htb 1:10 parent 1:2 rate 1000Mbit ceil 1000Mbit burst 126375b/8
mpu 0b overhead 0b cburst 126375b/8 mpu 0b overhead 0b level 5
 Sent 51888579644 bytes 62067679 pkt (dropped 0, overlimits 0 requeues 0)
 rate 653124Kbit 97656pps backlog 0b 0p requeues 0
 lended: 0 borrowed: 0 giants: 0
 tokens: 113 ctokens: 113

class htb 1:1 root rate 1000Mbit ceil 1000Mbit burst 126375b/8 mpu 0b
overhead 0b cburst 126375b/8 mpu 0b overhead 0b level 7
 Sent 51888579644 bytes 62067679 pkt (dropped 0, overlimits 0 requeues 0)
 rate 653123Kbit 97656pps backlog 0b 0p requeues 0
 lended: 0 borrowed: 0 giants: 0
 tokens: 113 ctokens: 113

class htb 1:2 parent 1:1 rate 1000Mbit ceil 1000Mbit burst 126375b/8
mpu 0b overhead 0b cburst 126375b/8 mpu 0b overhead 0b level 6
 Sent 51888579644 bytes 62067679 pkt (dropped 0, overlimits 0 requeues 0)
 rate 653124Kbit 97656pps backlog 0b 0p requeues 0
 lended: 0 borrowed: 0 giants: 0
 tokens: 113 ctokens: 113

class htb 1:108 parent 1:10 leaf 108: prio 7 quantum 1514 rate
555000Kbit ceil 555000Kbit burst 70901b/8 mpu 0b overhead 0b cburst
70901b/8 mpu 0b overhead 0b level 0
 Sent 51888579644 bytes 62067679 pkt (dropped 27801917, overlimits 0 requeues 0)
 rate 653124Kbit 97656pps backlog 0b 0p requeues 0
 lended: 62067679 borrowed: 0 giants: 0
 tokens: -798 ctokens: -798

As you can see, class htb 1:108 rate's is 653124Kbit! Much bigger that
it's ceil.

I also note that, for HTB rate configurations over 500Mbit/s on leaf
class, when I stop the traffic, in the output of "tc -s -d class ls
dev eth1" command, I see that leaf's rate (in bits/s) is growing
instead of decreasing (as expected since I've stopped the traffic).
Rate in pps is ok and decreases until 0pps. Rate in bits/s increases
above 1000Mbit and stays there for a few minutes. After two or three
minutes it becomes 0bit. The same happens for it's ancestors (also for
root class).Here's tc output of my leaf class for this situation:

class htb 1:108 parent 1:10 leaf 108: prio 7 quantum 1514 rate
555000Kbit ceil 555000Kbit burst 70901b/8 mpu 0b overhead 0b cburst
70901b/8 mpu 0b overhead 0b level 0
 Sent 120267768144 bytes 242475339 pkt (dropped 62272599, overlimits 0
requeues 0)
 rate 1074Mbit 0pps backlog 0b 0p requeues 0
 lended: 242475339 borrowed: 0 giants: 0
 tokens: 8 ctokens: 8

  Antonio Almeida
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
HTB accuracy for high speed, Antonio Almeida, (Fri May 15, 10:49 am)
Re: HTB accuracy for high speed, Vladimir Ivashchenko, (Sun May 17, 4:29 pm)
Re: HTB accuracy for high speed, Jarek Poplawski, (Sun May 17, 4:15 pm)
[PATCH iproute2 v2] Re: HTB accuracy for high speed, Jarek Poplawski, (Mon May 18, 3:01 am)
[PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Mon May 18, 2:56 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Antonio Almeida, (Mon May 18, 12:54 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Mon May 18, 1:53 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Antonio Almeida, (Mon May 18, 2:23 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Mon May 18, 2:32 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Antonio Almeida, (Mon May 18, 2:56 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Mon May 18, 3:05 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jesper Dangaard Brouer, (Tue May 19, 9:18 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Tue May 19, 3:35 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Antonio Almeida, (Tue May 19, 6:55 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Tue May 19, 7:09 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Denys Fedoryschenko, (Tue May 19, 7:04 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Tue May 19, 7:18 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Denys Fedoryschenko, (Tue May 19, 7:21 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Tue May 19, 7:28 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Antonio Almeida, (Tue May 19, 10:31 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Antonio Almeida, (Mon May 18, 1:16 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Thu May 21, 4:51 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Antonio Almeida, (Fri May 22, 1:42 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Sat May 23, 3:32 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Antonio Almeida, (Thu May 28, 2:13 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Thu May 28, 5:12 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Antonio Almeida, (Fri May 29, 1:02 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Sat May 30, 4:07 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Antonio Almeida, (Tue Jun 2, 6:12 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Antonio Almeida, (Tue Jun 2, 7:45 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Tue Jun 2, 8:36 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Patrick McHardy, (Tue Jun 2, 8:45 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Tue Jun 2, 9:08 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Patrick McHardy, (Tue Jun 2, 9:20 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Tue Jun 2, 5:37 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Tue Jun 2, 5:50 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Patrick McHardy, (Wed Jun 3, 3:06 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Wed Jun 3, 3:40 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Patrick McHardy, (Wed Jun 3, 3:53 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, David Miller, (Thu Jun 4, 12:53 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Thu Jun 4, 3:50 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Wed Jun 3, 5:54 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Antonio Almeida, (Thu Jun 4, 9:50 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Thu Jun 4, 3:30 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Patrick McHardy, (Thu Jun 4, 3:35 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Thu Jun 4, 3:42 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Badalian Vyacheslav, (Tue Jun 9, 1:25 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Tue Jun 9, 1:49 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Patrick McHardy, (Wed Jun 3, 6:01 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Patrick McHardy, (Wed Jun 3, 6:05 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Patrick McHardy, (Wed Jun 3, 6:06 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Wed Jun 3, 6:27 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Wed Jun 3, 4:01 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Patrick McHardy, (Wed Jun 3, 4:29 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Wed Jun 3, 4:45 am)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Fri May 29, 3:46 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Stephen Hemminger, (Fri May 29, 4:49 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Fri May 29, 4:59 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Stephen Hemminger, (Fri May 29, 1:28 pm)
Re: [PATCH iproute2] Re: HTB accuracy for high speed, Jarek Poplawski, (Fri May 29, 3:58 pm)
Re: HTB accuracy for high speed, Jarek Poplawski, (Sat May 16, 10:14 am)
Re: HTB accuracy for high speed, Eric Dumazet, (Mon May 18, 12:40 pm)
Re: HTB accuracy for high speed, Jarek Poplawski, (Mon May 18, 1:23 pm)
Re: HTB accuracy for high speed, David Miller, (Mon May 18, 5:52 pm)
Re: HTB accuracy for high speed, Antonio Almeida, (Mon May 18, 10:36 am)
Re: HTB accuracy for high speed, Vladimir Ivashchenko, (Mon May 18, 7:14 pm)
Re: HTB accuracy for high speed, Vladimir Ivashchenko, (Mon May 18, 7:27 pm)
Re: HTB accuracy for high speed, Jarek Poplawski, (Tue May 19, 7:03 am)
Re: HTB accuracy for high speed, Vladimir Ivashchenko, (Tue May 19, 10:04 am)
Re: HTB accuracy for high speed, Jarek Poplawski, (Tue May 19, 4:10 pm)
Re: HTB accuracy for high speed, Vladimir Ivashchenko, (Wed May 20, 6:07 pm)
Re: HTB accuracy for high speed, Eric Dumazet, (Wed May 20, 6:46 pm)
Re: HTB accuracy for high speed, Jarek Poplawski, (Thu May 21, 3:20 am)
Re: HTB accuracy for high speed, Vladimir Ivashchenko, (Thu May 21, 3:44 am)
Re: HTB accuracy for high speed, Jarek Poplawski, (Thu May 21, 4:28 am)
Re: HTB accuracy for high speed (and bonding), Vladimir Ivashchenko, (Sat May 23, 6:37 am)
Re: HTB accuracy for high speed (and bonding), Jarek Poplawski, (Sat May 23, 10:34 am)
Re: HTB accuracy for high speed (and bonding), Vladimir Ivashchenko, (Sat May 23, 11:06 am)
Re: HTB accuracy for high speed (and bonding), Jarek Poplawski, (Sat May 23, 11:35 am)
Re: HTB accuracy for high speed (and bonding), Vladimir Ivashchenko, (Sat May 23, 11:53 am)
Re: HTB accuracy for high speed (and bonding), Jarek Poplawski, (Sat May 23, 12:02 pm)
Re: HTB accuracy for high speed, Eric Dumazet, (Thu May 21, 5:07 am)
Re: HTB accuracy for high speed, Jarek Poplawski, (Thu May 21, 5:22 am)
Re: HTB accuracy for high speed, Jarek Poplawski, (Sat May 16, 4:31 am)
Re: HTB accuracy for high speed, Antonio Almeida, (Mon May 18, 6:39 am)
Re: HTB accuracy for high speed, Jarek Poplawski, (Mon May 18, 7:14 am)
Re: HTB accuracy for high speed, Antonio Almeida, (Mon May 18, 8:05 am)
Re: HTB accuracy for high speed, Stephen Hemminger, (Fri May 15, 2:12 pm)
Re: HTB accuracy for high speed, Antonio Almeida, (Mon May 18, 6:01 am)
Re: HTB accuracy for high speed, Stephen Hemminger, (Mon May 18, 12:13 pm)
Re: HTB accuracy for high speed, Stephen Hemminger, (Mon May 18, 6:02 pm)
Re: HTB accuracy for high speed, Antonio Almeida, (Tue May 19, 7:48 am)
Re: HTB accuracy for high speed, Antonio Almeida, (Tue May 19, 9:08 am)
Re: HTB accuracy for high speed, Antonio Almeida, (Mon May 18, 2:03 pm)
Re: HTB accuracy for high speed, Jarek Poplawski, (Mon May 18, 6:45 am)
Re: HTB accuracy for high speed, Antonio Almeida, (Mon May 18, 8:27 am)
Re: HTB accuracy for high speed, Jarek Poplawski, (Mon May 18, 8:32 am)