ALTQ Package CBQ Testing
Our goal is to test the ALTQ package to show its performance.
Machine topology
The test environment consists in two BSD machine connected with an ATM 155Mbps link (PVC). The first machine runs the TTCP sender and the ALTQ package; the second machine runs the TTCP receiver and, in some test, the TTT program to show graphical results.
In some test we have used a second configuration with 3 machines: the first is the TTCP sender, the second the ALTQ router, the third the TTCP receiver.
Since the first two machines are connected via a shared Ethernet, we set the CBQ bandwidth to 1Mbps to guarantee that the bottleneck was the CBQ link and not the Ethernet.
CBQ Configuration
First tests are done defining a channel of 1Mbps (the root class), and partitioning it in two sub_classes with the same priority but with different share. In a first test suite the share is 40-60%, in a second test suite 20 80%.
All results of this section are extracted with the TTCP program.
The classifier was been activated first on a basis of the Destination Port on the incoming packet, then on a basis of the Protocol type. Results show that in both cases the classifier seems run properly: there arent no differences between the classification on a port basis, and on a Protocol basis.
The configured share is respected by the CBQ daemon, and the total bandwidth is closely near to the Root class Bandwidth (1Mbps, but this bandwidth include also the Level 2 network overhead).
In these tests the amount of the TCP traffic, with the same filter, is a bit less than the amount of the UDP traffic: this is due to the congestion control mechanisms embedded in TCP.
Test |
Flow Type |
Throughput (Kbps) |
40 60% share; only TCP traffic Filter: on Destination Port |
TCP (40%) TCP (60%) |
377,12 542,32 Total: 919,44 |
40 60% share; only UDP traffic Filter: on Destination Port |
UDP (40%) UDP (60%) |
384,4 551,04 Total: 935,44 |
20 80% share; only TCP traffic Filter: on Destination Port |
TCP (20%) TCP (80%) |
187,68 698,64 Total: 886,32 |
20 80% share; only UDP traffic Filter: on Destination Port |
UDP (20%) UDP (80%) |
191,52 731,12 Total: 922,64 |
Some test are done with mixed traffic (UDP and TCP) but results are equivalent to the above tests.
Test |
Flow Type |
Throughput (Kbps) |
20 80% share; one TCP and one UDP connection Filter: on Destination Port |
TCP (20%) UDP (80%) |
187,92 730,16 Total: 918,08 |
20 80% share; one TCP and one UDP connection Filter: on Destination Port |
UDP (20%) TCP (80%) |
191,68 701,04 Total: 892,72 |
20 80% share; one TCP and one UDP connection Filter: on Protocol Type |
UDP (20%) TCP (80%) |
191,76 699,6 Total: 891,36 |
Since CBQ is a non Work Conserving schedule discipline, some test are done with only one flow. Result matches very well the tests with two flows.
Test |
Flow Type |
Throughput (Kbps) |
40 60% share; only UDP traffic on the slowest class Filter: on Destination Port |
UDP (40%) |
378,32 |
40 60% share; only UDP traffic on the fastest class Filter: on Destination Port |
UDP (60%) |
560,72 |
20 80% share; only TCP traffic on the slowest class Filter: on Destination Port |
TCP (20%) |
188,4 |
To improve performance, in CBQ its possible to specify that if one class has a lot of traffic and an other has unused bandwidth, the traffic of the first class can use also the free bandwidth of the second. This feature must be explicitly configured and this "borrow process" must be done on a parent class.
Results show that there is a lot of problem with this feature. Results show that:
Test |
Flow Type |
Throughput (Kbps) |
40 60% share; only UDP traffic. The 40% class borrow from the root class. Filter: on Destination Port |
UDP (40%) (borrow) UDP (60%) |
1906,64 356,56 Total: 2263,2 |
40 60% share; only UDP traffic on the slowest class. The 40% class borrow from the root class. Filter: on Destination Port |
UDP (40%) (borrow) |
1997,52 |
40 60% share; only UDP traffic on the fastest class. The 40% class borrow from the root class. Filter: on Destination Port |
UDP (60%) |
560,88 |
40 60% share; only UDP. The 60% class borrow from the root class. Filter: on Destination Port |
UDP (40%) UDP (60%) (borrow) |
282,08 1909,44 Total: 2191,52 |
The trace shows a very strange behavior: the CBQ daemon only sometime give bandwidth to the flow that has no borrow. Before the "borrow" flow starts, vice versa, the behavior of this flow is normal (oscillation are due to the small bandwidth used, 1Mbps for the root class).
The same test is performed changing the class tree distribution, defining a new intermediate class with the 50% share. Tests show a better behavior, but its not yet the ideal behavior.
This problem with the "borrow" parameter is confirmed in the ALTQ paper (ftp://ftp.csl.sony.co.jp/pub/kjc/papers/altq98.ps.gz) but the author report only that "the priority and borrowing especially when a class has high priority but a small share of bandwidth does not work well".
Test |
Flow Type |
Throughput (Kbps) |
20 30% share; only UDP traffic. The 20% class borrow from the secondary class. Filter: on Destination Port |
UDP (20%) (borrow) UDP (30%) |
253,12 262,08 Total 515,2 |
10 40% share; only UDP traffic. The 10% class borrow from the secondary class. Filter: on Destination Port |
UDP (10%) (borrow) UDP (40%) |
304,64 358,64 Total: 663,28 |
NOTES
Traces
We have done some test to understand the performance, in the time domain, of the ALTQ package.
We used the configuration with 2 machines: the first has the CBQ daemon and two TTCP Senders, the second is the TTCP receiver and it has the TTT graphics package installed to evaluate the traffic leaving the CBQ daemon.
The classes configuration is always the same: a root class with two sub_classes: one has the 20% and the other has the 80% of the root bandwidth. In these test the root class has 10Mbps.
Test
20 80% share; two TCP connection in the same class Filter: on Protocol Type (20% UDP, 80% TCP) |
Flow Type
TCP_1 (80%) TCP_2 (80%) |
In this test we use two TCP flow both are in the same CBQ class. Results show that the two connections share correctly the 50% of the total bandwidth. But this graph shows also one problem: the used bandwidth is quite low compared to the root bandwidth (10Mbps). This seems does not depend from the test suite (TTCP) because without the CBQ daemon the throughput is very high.
This test has been performed also with:
In all these tests the maximum throughput is nearly 1.8Mbps.
Test
20 80% share; one TCP and one UDP connection Filter: on Protocol Type (20% UDP, 80% TCP) |
Flow Type
TCP (80%) UDP (20%) |
This graphs show the result with two flows, one UDP and one TCP, belonging to two different class. The UDP flow was assigned to the slow class (20%), and the TCP flow was assigned to the fast class. Results show that:
The same test are repeated with two flow (one TCP and one UDP) differentiated on a port basis: results are the same.
Test are repeated with 1Mbps as the root bandwidth: results show that in this case the behavior is correct: the share is quite good, one class use only its bandwidth even if there aren't any other flows, the classes does not influence each other, the bandwidth used is 1Mbps.
Test
20 80% share; one TCP and one UDP connection Filter: on a port basis (20% port 2000, 80% port 3000) |
Flow Type
TCP (80%) (1) TCP (20%) (1) UDP (80%) (2) UDP (20%) (2) |
These two test shows the behavior in a configuration when two equal flow (TCP-TCP and UDP-UDP) are sent in the CBQ daemon. These flow, despite they belong to the same protocol, are differentiated by the destination Port: so one flow was put in the high priority flow, and the second was put in the low priority class. Results show that:
Conclusions
ALTQ package seems have the following problems: