Skip to contentSkip to conversation

imprecision in bandwidth measurement

LARTC Tilman Giese (Global View) 3 participants 5 messages Dec 5, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

I am experiencing a curious phenomenon. I limited the bandwidth for a specific client to 750KBit. It works well despite of the fact that the client always gets a little bit more bandwidth (around 770KBit to 780KBit). I used different bandwidth and traffic measurement tools like ntop, nettimer or ipac. All show the same, a little bit more bandwidth than allowed. The factor by which the specified bandwidth is increased seems to be proportional to the specified bandwidth. But where is the problem. Is it only a different way of traffic measurement or is this a bug? Maybe, does it depend on some command arguments to create the classes?

Tilman

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 11 lines · Tilman Giese (Global View)

Hi,

I am experiencing a curious phenomenon. I limited the bandwidth for a specific client to 750KBit. It works well despite of the fact that the client always gets a little bit more bandwidth (around 770KBit to 780KBit). I used different bandwidth and traffic measurement tools like ntop, nettimer or ipac. All show the same, a little bit more bandwidth than allowed. The factor by which the specified bandwidth is increased seems to be proportional to the specified bandwidth. But where is the problem. Is it only a different way of traffic measurement or is this a bug? Maybe, does it depend on some command arguments to create the classes?

Can you post us your tc commands ?

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#2 lore raw
In reply to Tilman Giese (Global View)
Quoted 3 lines · Stef Coene

Can you post us your tc commands ?

# tc qdisc add dev eth0 root handle 1: cbq bandwidth 10MBit allot 1514 
cell 8 avpkt 1000 mpu 64
# tc filter add dev eth0 parent 1:0 prio 5 protocol ip u32
# tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10MBit rate 
10MBit allot 1514 cell 8 weight 1MBit prio 5 maxburst 20 avpkt 1000 bounded
# tc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 750KBit 
rate 750KBit avpkt 1000 cell 8 prio 5 allot 1514 weight 75KBit maxburst 
21 bounded
# tc class add dev eth0 parent 1:2 classid 1:3 cbq bandwidth 750KBit 
rate 50KBit avpkt 1000 cell 8 prio 5 allot 1514 weight 5KBit maxburst 21
# tc filter add dev eth0 parent 1: prio 5 u32 match ip src 
192.168.0.33/32 flowid 1:3

Tilman

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#3 lore raw
In reply to Tilman Giese (Global View)
Quoted 15 lines · Tilman Giese (Global View)
Quoted 1 line · Stef Coene

Can you post us your tc commands ?

# tc qdisc add dev eth0 root handle 1: cbq bandwidth 10MBit allot 1514
cell 8 avpkt 1000 mpu 64
# tc filter add dev eth0 parent 1:0 prio 5 protocol ip u32
# tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10MBit rate
10MBit allot 1514 cell 8 weight 1MBit prio 5 maxburst 20 avpkt 1000 bounded
# tc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 750KBit
rate 750KBit avpkt 1000 cell 8 prio 5 allot 1514 weight 75KBit maxburst
21 bounded
# tc class add dev eth0 parent 1:2 classid 1:3 cbq bandwidth 750KBit
rate 50KBit avpkt 1000 cell 8 prio 5 allot 1514 weight 5KBit maxburst 21
Quoted 2 lines
# tc filter add dev eth0 parent 1: prio 5 u32 match ip src
192.168.0.33/32 flowid 1:3

I don't see any error in your scripts. I did some tests myself and this is the result :
http://docum.org/stef.coene/qos/tests/cbq/bounded/bounded.html
I had the same result. The bandwidth you get is a bit more then the configured rate.

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#4 lore raw
In reply to Tilman Giese (Global View)
Quoted 11 lines · Tilman Giese (Global View)

Hi,

I am experiencing a curious phenomenon. I limited the bandwidth for a specific client to 750KBit. It works well despite of the fact that the client always gets a little bit more bandwidth (around 770KBit to 780KBit). I used different bandwidth and traffic measurement tools like ntop, nettimer or ipac. All show the same, a little bit more bandwidth than allowed. The factor by which the specified bandwidth is increased seems to be proportional to the specified bandwidth. But where is the problem. Is it only a different way of traffic measurement or is this a bug? Maybe, does it depend on some command arguments to create the classes?

tc uses 1024 instead of 1000 as factor for kbit (1024^2 for mbit). Usually when talking about network equipment kbit means 1000bit/s and mbit means 1000000bit/s. In your case, 750*24bit/s = 18000bit/s off. The iproute-rates patch at trash.net/~kaber/hfsc is meant to fix this.

Best regards,
Patrick

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/