Bug 488918

Summary: tc htb works different between tcp and udp
Product: Red Hat Enterprise Linux 5 Reporter: Kirby Zhou <kirbyzhou>
Component: iprouteAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED CANTFIX QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: low    
Version: 5.3Keywords: Reopened
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-15 09:22:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kirby Zhou 2009-03-06 07:51:39 UTC
Description of problem:

I configured a tc htb qdisc to limit package sending speed at dport=5000, but I found the sending speed is different between tcp and udp. It seems a bug.


Version-Release number of selected component (if applicable):

iproute-2.6.18-9.el5
kernel-2.6.18-128.el5
kernel-xen-2.6.18-128.el5

How reproducible:


Steps to Reproduce:

Under a gigibit lan environment.
1.
  tc qdisc add dev eth0 root handle 1: htb
  tc class add dev eth0 classid 1:10 parent 1: htb rate 1mbit
  tc filter add dev eth0 parent 1: protocol ip prio 100 u32 match ip dport 5000 0xffff classid 1:10

2. 

]# iperf -c 10.10.63.27 -p 5000 -l 100
[  3]  0.0-10.1 sec  9.05 MBytes  7.54 Mbits/sec

]# iperf -c 10.10.63.27 -p 5000 -l 1000
[  3]  0.0-10.0 sec  1.10 GBytes    942 Mbits/sec

]# iperf -u -c 10.10.63.27 -p 5000 -l 100
[  3]  0.0-10.0 sec    914 KBytes    748 Kbits/sec
[  3] Server Report:
[  3]  0.0-10.2 sec    914 KBytes    736 Kbits/sec  7.168 ms    0/ 9358 (0%)

]# iperf -u -c 10.10.63.27 -p 5000 -l 1000
[  3]  0.0-10.0 sec  1.20 MBytes  1.01 Mbits/sec
[  3] Server Report:
[  3]  0.0-10.5 sec  1.20 MBytes    964 Kbits/sec  8.376 ms    0/ 1262 (0%)
3.
  
Actual results:

see above

Expected results:

iperf test over tcp should be limited around 1mbit not 10mbit.

Additional info:

Comment 1 Marcela Mašláňová 2009-03-13 14:00:38 UTC
Couldn't it be an error in iperf? Anyway I don't have Gbits. Is it visible also on Mbits scale?

Comment 2 Marcela Mašláňová 2009-03-24 14:10:37 UTC
In case you have still troubles please contact our support at:
https://www.redhat.com/apps/support/

Comment 3 Kirby Zhou 2011-03-08 11:12:44 UTC
The bug is still exist in 2.6.18-238.1.1.el5:


]# tc class change dev eth1 parent 0: classid 0:1 htb rate 1000kbit 

]# iperf -c 10.14.17.2 -i 1 -u -b 1000m
------------------------------------------------------------
Client connecting to 10.14.17.2, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  126 KByte (default)
------------------------------------------------------------
[  3] local 10.14.10.227 port 33307 connected with 10.14.17.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec   218 KBytes  1.79 Mbits/sec
[  3]  1.0- 2.0 sec   109 KBytes   894 Kbits/sec
[  3]  2.0- 3.0 sec   106 KBytes   870 Kbits/sec
[  3]  3.0- 4.0 sec   108 KBytes   882 Kbits/sec
[  3]  4.0- 5.0 sec   109 KBytes   894 Kbits/sec
[  3]  5.0- 6.0 sec   164 KBytes  1.34 Mbits/sec
[  3]  6.0- 7.0 sec   109 KBytes   894 Kbits/sec
[  3]  7.0- 8.0 sec   109 KBytes   894 Kbits/sec
[  3]  8.0- 9.0 sec   108 KBytes   882 Kbits/sec
[  3]  9.0-10.0 sec   109 KBytes   894 Kbits/sec
[  3]  0.0-10.1 sec  1.22 MBytes  1.02 Mbits/sec
[  3] Sent 871 datagrams
[  3] Server Report:
[  3]  0.0-10.5 sec  1.22 MBytes   975 Kbits/sec  38.332 ms    0/  870 (0%)
[  3]  0.0-10.5 sec  1 datagrams received out-of-order

]# iperf -c 10.14.17.2 -i 1 
------------------------------------------------------------
Client connecting to 10.14.17.2, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[  3] local 10.14.10.227 port 47741 connected with 10.14.17.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec  1.12 MBytes  9.44 Mbits/sec
[  3]  1.0- 2.0 sec   896 KBytes  7.34 Mbits/sec
[  3]  2.0- 3.0 sec   896 KBytes  7.34 Mbits/sec
[  3]  3.0- 4.0 sec  1.00 MBytes  8.39 Mbits/sec
[  3]  4.0- 5.0 sec   768 KBytes  6.29 Mbits/sec
[  3]  5.0- 6.0 sec  1.00 MBytes  8.39 Mbits/sec
[  3]  6.0- 7.0 sec   896 KBytes  7.34 Mbits/sec
[  3]  7.0- 8.0 sec   896 KBytes  7.34 Mbits/sec
[  3]  8.0- 9.0 sec   896 KBytes  7.34 Mbits/sec
[  3]  9.0-10.0 sec  1.00 MBytes  8.39 Mbits/sec
[  3]  0.0-10.3 sec  9.38 MBytes  7.67 Mbits/sec

Comment 4 Marcela Mašláňová 2011-03-15 09:22:02 UTC
My comments are still same as #1 and #2 before.