What algorithm does HTB use to calculate available tokens?

Jon Doe <[email protected]>
Newsgroups org.kernel.vger.lartc
Message-ID <CAMes488B+_dK_SjMZDz_UuDAAkAVCAFE77=307DdanYALxyoSg@mail.gmail.com>
Hi,

I'm trying to understand why I'm seeing less (not more) tokens on a
1Mbits HTB class vs a 100Kbits class:

tc class add dev eth0 parent 1: classid 1:1 htb rate 1Mbit
tc -s -d class show dev eth0
class htb 1:1 root prio 0 quantum 12500 rate 1Mbit ceil 1Mbit
linklayer ethernet burst 1600b/1 mpu 0b cburst 1600b/1 mpu 0b level 0
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 lended: 0 borrowed: 0 giants: 0
 tokens: 200000 ctokens: 200000

vs

tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbit
tc -s -d class show dev eth0
class htb 1:1 root prio 0 quantum 1250 rate 100Kbit ceil 100Kbit
linklayer ethernet burst 1600b/1 mpu 0b cburst 1600b/1 mpu 0b level 0
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 lended: 0 borrowed: 0 giants: 0
 tokens: 2000000 ctokens: 2000000

Why is there 10 times more tokens available on 100kbits (at the same
burst value)?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.