Thank you Andy! I had changed limit values and that solved the problem. However, I did it by typing command like this for each created queue: tc qdisc add dev eth0 parent 1:10 handle 20: pfifo limit 10 Is there some command with which I can change default limit size so that I don't have to this every time I create class? Thanks a lot one more time! Slavica 2014-04-11 0:48 GMT+02:00 Andy Furniss <adf.lists@xxxxxxxxx>: > Slavica Tomovic wrote: >> >> Hi to all, >> >> I am using CentOS 6.4 and have problems when I want to limit >> bandwidth of TCP flow to some value smaller than 15 Mbit/s. Namely, I >> used iperf to generate TCP traffic and limited bandwidth (with tc >> command) for that flow on 6 Mbit/s. I got approximately 6 Mbit/s in >> average but iperf, which I adjusted to report me statistics every >> second, showed that in one second flow got 10 Mbit/s or more and than >> for few consecutive seconds 0 Mbit/s. With UDP traffic everything >> works fine. I expected that TCP bandwidth will fluctuate because of >> congestion mechanism but not like this. When I reserve more than 15 >> Mbit/s situation is pretty much OK. >> >> Also I had similar problem when I tried to split link bandwidth >> (which I had throttled previously on 10 Mbit/s with tc) between two >> TCP flows. On the other side, TCPvsUDP and UDPvsUDP slicing works >> fine. >> >> I had updated kernel version to 2.6.32-431 recently. I don't know >> did this cause a problem because I didn't use tc htb mechanism in >> the older version. >> >> Do you have any idea why is this happening and how I can fix it? >> >> These are commands I had used to create htb classes: >> >> tc class add dev eth0 parent 1: classid 1:1 htb rate 10000kbps ceil >> 10000kbps tc class add dev eth0 parent 1:1 classid 1:10 htb rate >> 4000kbps ceil 4000kbps tc class add dev eth0 parent 1:1 classid 1:11 >> htb rate 6000kbps ceil 6000kbps > > > kbps means k bytes/sec, use kbit or mbit > > If you don't specify child qdiscs for htb it will use pfifo with the > txqlen on the device as the limit which may be a bit long on eth (1000) > or on ppp too short (3). > > > > > -- To unsubscribe from this list: send the line "unsubscribe lartc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html