My application run on port 8080. I have this iptables command:

iptables -A OUTPUT -t mangle -p tcp --sport 8080 -j MARK --set-mark 10

I have also theses TC rules:

tc qdisc add dev eth0 root handle 1: htb default 10
tc class add dev eth0 parent 1:0 classid 1:10 htb rate 50kbps ceil 110kbps prio 0 mtu 1500

The bandwith is successfully limited to 50 kbps for such application. However, in all of my tests, the bandwith never reach the CEIL value and even more, only stay at the specified rate. Such behavior is not convenient, especially when the link is idle.

What reasons can cause the bandwith to never go ahead such rate ?

up vote 0 down vote accepted

You didn't define the burst size.

From man tc-htb :

burst bytes

Amount of bytes that can be burst at ceil speed, in excess of the configured rate. Should be at least as high as the highest burst of all children.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.