Bug 657
Summary: | The HTB utility is not working properly using 2.5.73 kernel | ||
---|---|---|---|
Product: | Networking | Reporter: | Yaron (yaronb) |
Component: | Other | Assignee: | Arnaldo Carvalho de Melo (acme) |
Status: | CLOSED PATCH_ALREADY_AVAILABLE | ||
Severity: | high | CC: | acme, yaronb |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.5.73 | Subsystem: | |
Regression: | --- | Bisected commit-id: |
Description
Yaron
2003-05-01 12:57:34 UTC
AMD XP 1700+, Linux kernel 2.5.68, iproute 20010824-9 (updated Debian Sid), shaping eth0 outgoing traffic with a script like the following: tc qdisc add dev eth0 root handle 1: htb default 10 tc class add dev eth0 parent 1: classid 1:1 htb rate 1000Kbit tc class add dev eth0 parent 1:1 classid 1:10 htb rate 1000Kbit To generate traffic, "nc -l -p 8000 > /dev/null" on the server end "cat /tmp/linux-2.5.68.tar.bz2 | nc server 8000" on the client. Tranfer rate measured via "gkrellm" shows a mean value of 135 KB/s (1080 Kbps), and via "iptraf": Average rates: Total: 1014.31 kbits/s, 110.03 packets/s Incoming: 14.51 kbits/s, 27.48 packets/s Outgoing: 999.81 kbits/s, 82.56 packets/s At the end of the test, the default class (created just before tbe test) shows: class htb 1:10 parent 1:1 prio 0 rate 1000Kbit ceil 1000Kbit burst 2815b cburst 2815b Sent 32067540 bytes 21214 pkts (dropped 0, overlimits 0) rate 137654bps 90pps backlog 18p lended: 21196 borrowed: 0 giants: 0 tokens: -33 ctokens: -33 In short, it works for me. I did a comprehensive testing with 2.3 and 2.4.20 kernels. I used an Ixia as a traffic generator for pumping data to the Linux box. In the Linux box I have two interfaces, one is used for data input and one is used for data output. ------- -------- | |1 ---> eth0 |Linux | |Ixia |2 <--- eth1 | | ------- -------- I set the policing setting to eth1. The Linux box forwarded every packet it receives on interface eth0. In my tests I tried different rate limits and different packet sizes. I found a linear relation between the burst and the traffic, which give the most accurate results. I am trying to verify the same results using 2.5.68 kernel. The reason it works for you is because you were using a rate limit of 1000kbit and a packet size of 512. I verified your test, and it looks like it works fine. When I tried different packet sizes, and different rates the HTB scheduling doesn't work well. The following is a sample of test results: Test 1: Pumping: 74Mbit/s Rate limit: 1000Kbit Results: Packet size Received traffic (eth1) 64 27Mbit/s 128 42Mbit/s 512 1.3Mbit/s 1500 1.1Mbit/s Test 2: Pumping: 74Mbit/s Rate limit: 2000Kbit Results: Packet size Received traffic (eth1) 64 27Mbit/s 512 4Mbit/s 1500 2.4Mbit/s Test 3: Pumping: 74Mbit/s Rate limit: 6000Kbit Results: Packet size Received traffic (eth1) 64 27Mbit/s 512 74Mbit/s 1500 6Mbit/s Test 4: Pumping: 74Mbit/s Rate limit: 8000Kbit Results: Packet size Received traffic (eth1) 64 27Mbit/s 512 74Mbit/s 1500 12Mbit/s As you can see from the results, the rate shaping functionality doesn't works in most Cases. As I maintained before, these tests works very well in 2.4.20. I hope it helps. Please let me know if you need more information. Yaron In mail exchange Yaron verifies that problem is solved, closing. |