Re: TC/CBQ shaping problems

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> It doesn't seem to help. I still see bandwidth being shared equally
> between classes. Both iperf sessions report approximately 46 to 47
> Mbits/sec. Do you think what I am trying to achieve is possible with
> CBQ?
Okay...
I have spent some time trying different CBQ trees until I found that I
can't divide 100mbits with precision better than 10 mbit. I managed to
do it before though, but with different proportions... Most surprisingly
precision goes worse when avpkt goes closer to 1500 (iperf sends quite
big packets).
I tried HTB and found that it doesn't divide 100mbit well, but if we try
to limit outgoing interface by 50 mbit and divide it, it works just
fine (see below). I guess that CBQ would do it too, if we don't try to
control 100% of interface bandwidth and set all qdisc/class attributes
precisely.

--------------------------------------------------------------------------
tc qdisc add dev home root handle 10: htb default 3
tc class add dev home parent 10: classid 10:1 htb rate 50mbit
tc class add dev home parent 10:1 classid 10:2 htb rate 40mbit ceil 50mbit
tc class add dev home parent 10:1 classid 10:3 htb rate 10mbit ceil 50mbit
tc filter add dev home parent 10: prio 1 protocol ip u32 match ip dst 10.0.0.102 match ip dport 2000 0xffff flowid 10:2

Now we have iperf server at 10.0.0.102, ports 2000 and 2001.
1. port 2000 traffic only
$ iperf --client 10.0.0.102 --port 2000 --format k --time 10 --interval 1
------------------------------------------------------------
Client connecting to 10.0.0.102, TCP port 2000
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  5] local 10.0.0.103 port 44056 connected with 10.0.0.102 port 2000
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0- 1.0 sec  6376 KBytes  52232 Kbits/sec
[  5]  1.0- 2.0 sec  6120 KBytes  50135 Kbits/sec
[  5]  2.0- 3.0 sec  6184 KBytes  50659 Kbits/sec
[  5]  3.0- 4.0 sec  6224 KBytes  50987 Kbits/sec
[  5]  4.0- 5.0 sec  6168 KBytes  50528 Kbits/sec
[  5]  5.0- 6.0 sec  6192 KBytes  50725 Kbits/sec
[  5]  6.0- 7.0 sec  6208 KBytes  50856 Kbits/sec
[  5]  7.0- 8.0 sec  6216 KBytes  50921 Kbits/sec
[  5]  8.0- 9.0 sec  6208 KBytes  50856 Kbits/sec
[  5]  9.0-10.0 sec  6200 KBytes  50790 Kbits/sec
[  5]  0.0-10.0 sec  62104 KBytes  50780 Kbits/sec

2. port 2001 traffic only
iperf --client 10.0.0.102 --port 2001 --format k --time 10 --interval 1
------------------------------------------------------------
Client connecting to 10.0.0.102, TCP port 2001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  5] local 10.0.0.103 port 48914 connected with 10.0.0.102 port 2001
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0- 1.0 sec  6280 KBytes  51446 Kbits/sec
[  5]  1.0- 2.0 sec  6176 KBytes  50594 Kbits/sec
[  5]  2.0- 3.0 sec  6208 KBytes  50856 Kbits/sec
[  5]  3.0- 4.0 sec  6192 KBytes  50725 Kbits/sec
[  5]  4.0- 5.0 sec  6224 KBytes  50987 Kbits/sec
[  5]  5.0- 6.0 sec  6216 KBytes  50921 Kbits/sec
[  5]  6.0- 7.0 sec  6192 KBytes  50725 Kbits/sec
[  5]  7.0- 8.0 sec  6192 KBytes  50725 Kbits/sec
[  5]  8.0- 9.0 sec  6200 KBytes  50790 Kbits/sec
[  5]  9.0-10.0 sec  6208 KBytes  50856 Kbits/sec
[  5]  0.0-10.0 sec  62096 KBytes  50787 Kbits/sec

3. port 2001 traffic is sent alone, then mixed with port 2000 traffic,
then is sent alone again.

3.1 xterm 1:
$ date; iperf --client 10.0.0.102 --port 2001 --format k --time 20 --interval 1
Птн Янв  6 04:31:54 MSK 2006
------------------------------------------------------------
Client connecting to 10.0.0.102, TCP port 2001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  5] local 10.0.0.103 port 53131 connected with 10.0.0.102 port 2001
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0- 1.0 sec  6336 KBytes  51905 Kbits/sec
[  5]  1.0- 2.0 sec  6184 KBytes  50659 Kbits/sec
[  5]  2.0- 3.0 sec  6208 KBytes  50856 Kbits/sec
[  5]  3.0- 4.0 sec  6200 KBytes  50790 Kbits/sec
[  5]  4.0- 5.0 sec  6192 KBytes  50725 Kbits/sec
[  5]  5.0- 6.0 sec  6208 KBytes  50856 Kbits/sec
[  5]  6.0- 7.0 sec  6200 KBytes  50790 Kbits/sec
[  5]  7.0- 8.0 sec  3360 KBytes  27525 Kbits/sec
[  5]  8.0- 9.0 sec  1216 KBytes  9961 Kbits/sec
[  5]  9.0-10.0 sec  1232 KBytes  10093 Kbits/sec
[  5] 10.0-11.0 sec  1248 KBytes  10224 Kbits/sec
[  5] 11.0-12.0 sec  1312 KBytes  10748 Kbits/sec
[  5] 12.0-13.0 sec  1224 KBytes  10027 Kbits/sec
[  5] 13.0-14.0 sec  1208 KBytes  9896 Kbits/sec
[  5] 14.0-15.0 sec  4088 KBytes  33489 Kbits/sec
[  5] 15.0-16.0 sec  6208 KBytes  50856 Kbits/sec
[  5] 16.0-17.0 sec  6184 KBytes  50659 Kbits/sec
[  5] 17.0-18.0 sec  6216 KBytes  50921 Kbits/sec
[  5] 18.0-19.0 sec  6224 KBytes  50987 Kbits/sec
[  5] 19.0-20.0 sec  6200 KBytes  50790 Kbits/sec
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0-20.0 sec  89456 KBytes  36613 Kbits/sec

3.2 xterm 2:
$ date; iperf --client 10.0.0.102 --port 2000 --format k --time 7 --interval 1
Птн Янв  6 04:32:02 MSK 2006
------------------------------------------------------------
Client connecting to 10.0.0.102, TCP port 2000
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  5] local 10.0.0.103 port 41592 connected with 10.0.0.102 port 2000
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0- 1.0 sec  4928 KBytes  40370 Kbits/sec
[  5]  1.0- 2.0 sec  5008 KBytes  41026 Kbits/sec
[  5]  2.0- 3.0 sec  4960 KBytes  40632 Kbits/sec
[  5]  3.0- 4.0 sec  4960 KBytes  40632 Kbits/sec
[  5]  4.0- 5.0 sec  4944 KBytes  40501 Kbits/sec
[  5]  5.0- 6.0 sec  4968 KBytes  40698 Kbits/sec
[  5]  6.0- 7.0 sec  4960 KBytes  40632 Kbits/sec
[  5]  0.0- 7.0 sec  34736 KBytes  40547 Kbits/sec


-- 
    DO4-UANIC
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux