Dear reader, I'm not updating these pages anymore. If you have tc or ip related questions, you can post them on the LARTC mailing list.

My setup

Test environment : Used hardware and software, tools I used to generate traffic, how I measured the bandwidth used

traffic generators : list of traffic generators you can use

HTB tests

This is a new qdisc that's not (yet) include in the kernel. It's heavily maintained and is designed to do a better job then CBQ. The idea behind CBQ is good, but in real life situations it's not working very well. It's also a qdisc that's very easy to implement. No difficult options, no dark knobs to use :-) It just works the way you want it to work.

I did some HTB tests. You probably didn't expect anything else, why else would you visit this site ?
The results are nearly perfect.

I did some burst test.

If you are interested in the parent/child relation ship, you can visit this page.

I also did some tests to see what happens if you change the quantum parameter. You can find the test here.

CBQ tests

All these tests were done on a local 10mbit network with no latency and no other traffic. This is ideal for CBQ and that's why I have good results. But when you read the theory behind the CBQ implementation, you will see that it uses the idle time of the link and this depends on too many unknown parameters : size of the packets, physical link bandwidth, other bottlenecks in the network. If you want more information about it, read the Linux 2.4 Advanced Routing HOWTO.

There is a new qdisc, HTB. This qdisc can do the same as CBQ, but uses much better parameters to do so. If you scroll down about 1 page, you will find some extra tests.

-0- CBQ bounded accuracy
You can bound a class so it can not transmit more than the rate you give it. It works and it's accurate. It is not perfect, but with some trial and error, you can bound the traffic to each possible rate.

-0- How to use CBQ classes & qdiscs
I want to give two hosts a certain bounded bandwidth and they have to be able to borrow unused bandwidth from each other. To do so, I tried some combinations of classes and qdiscs.

-0- How to put the traffic in CBQ classes
You can divide the traffic in different classes so that the classes can borrow bandwidth from each other. But I get some very strange results in doing so when you combine several parameters and when you use qdiscs or not.

I have an overview and you can find more information on the following 2 pages.

-0- dividing when you provide the weight parameter
With the weight parameter, you can manipulate how much traffic flows in which class, but you have to make sure that the weights are proportional to the rates to get good results.

-0- dividing when you provide no weight parameter
You can influence how the traffic is split with the weight parameter. To make life easy, you can provide no weight parameter to get the same results, but sometimes you will get strange results.

I found some extra information. It's about the CBQ implementation for BSD and it goes on about the bounded parameter as to why it's sometimes inaccurate. Full story or small, local copy.

-0- Filter tests
I tried different filters to put traffic in the CBQ classes and subclasses. It seems that you have to attach the filters to the qdiscs to which the classes belong. You can use a filter directly to the right class or use different filters to get there.

The isolated parameter is not working and disturbs the traffic control so much, that it's better you don't use it.

-0- Other traffic generators
I tried CBQ with different traffic generators. For now, I generated as much traffic as possible in 1 stream (with iperf). So the classes are always used 100%. But what happens when you create more then 1 stream or don't have enough traffic to fulfill a class? Or if you have 1 class with 10 data streams?

TBF tests


I did some tests with tbf. I set up a tbf root qdisc with different rates and each time I tested the available bandwidth. The results are almost perfect. You can also use the TBF qdisc in a class-full qdisc like CBQ to limit certain data streams. But it will create extra overhead while you can also limit the traffic with htb or cbq.

Interactive traffic

You can give certain packets a higher priority. You can do this to get better ping results are to improve interactive traffic like telnet or ssh. I tried some things out and you can find the results on this page.