Subject: HTB - very bad precision? HFSC works fine! 2.6.28

From: Denys Fedoryschenko <[email-masked]>
Date: Thu, 8 Jan 2009 00:02:36 +0200

I notice that our uplink ISP complaining, that we are exceeding our UP rate.

I have configured at HTB 60Mbps, but he is actually receiving bursts up to 
64Mbps.

I tried to lower down HTB values to 57Mbps, and even on Cisco switch interface 
counter(it is averaging 30 seconds of data i guess, to calculate bandwidth) - 
it shows 60.1 - 60.4.

Funny thing, root class in HTB shows 57.1 - 57.3 Mbps. So maybe byte counting 
is wrong in HTB?

I have also "default filter" 
tc filter add dev ${DEV} parent 1:0 protocol ip prio 800 u32 match ip src 
0.0.0.0/0 flowid 1:50

and for HFSC i did also filter for arp.

I tried just to replace HTB plainly by HFSC, and it works perfectly and 
precise. Just what i did - removed prio in class, PARAM variable, and changed 
names by replace 
"htb rate" to "est 1sec 8sec hfsc sc rate"
and
"ceil" to "ul rate"

And 57 and bandwidth on switch went to 56.7 - 56.9, and stays very stable.

P.S. overhead 16 - i tried first without it, then with - no difference.