Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

What is the difference between the HTB rate and Ceil values?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Rate is the rate they will be allowed to allocate when bandwidth is tight. However, when bandwidth isn't tight, HTB allows classes to "borrow" bandwidth from other classes. Ceil limits how much they can borrow. Lets say you have this:

tc class add dev eth0 parent 1: classid 1:1 htb rate 90kbps ceil 90kbps
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 30kbps ceil 60kbps
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 30kbps ceil 60kbps
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 30kbps ceil 60kbps

If all classes 1:10,1:11,1:12 are trying to send as much as possible, they will be allowed to send their allowed 30kbps. If, in contrast, 1:10 is the only one sending. It would be allowed to borrow some of the parents bandwidth, since its siblings aren't using it, but it won't be able to use all 100kbps, it will only be able to use 60kbps, because it is limited by ceil.

You can think of it this way. You have to spend tokens in order to send bandwidth. The rate is how fast you are given tokens to spend. The ceil is how many of your siblings unused tokens you are allowed to borrow.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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