• HTB: quantum of class 10001 is big. Consider r2q change問題
  • 推文至Facebook  
  • 在使用HTB的時候,有時會碰到htb quantum of class 10001 is big. consider r2q change的警告,而quantum是HTB子類借父類帶寬時的計算依據。如果該參數設置不好,可能會碰到意想不到的結果。


    根據HTB的官方文檔顯示,quantum是在可以“借”的情況下,一次可以“借”多少,並且說這個值最好盡量的小,但要大於MTU;而且這個值是不用手動設置,它會根據r2q的值計算出來。

    Changing burst will not remove the warning. r2q is "rate to quantum" is used


    to calculate the quantum for each class : quantum = rate / r2q. Quantum must


    be 1500 < quantum < 60000. Otherwise you will get warnings from the kernel.


    Solution : choose r2q so for each class  1500 < quantum < 60000


    Or choose the best r2q you can and specify the quantum manually if you add a


    class.


    HTB manual建議quantum取值要盡量小,且要大於mtu。這樣,quantum的最佳值就是等於mtu。如果不設置該參數,默認quantum=rate/r2q,而默認r2q=10,默認mtu=1500,也就是說使用默認參數只適合rate=15kbps的情況。當實際帶寬不同時,需要手動設置r2q參數:


    r2q=rate/mtu,實際r2q最好比計算出的值小一點,以保證quantum>mtu。

    tc class add dev $ROUTENAL parent 10: classid 10:1 htb rate 600kbps ceil 1000000kbps

    範例 6000K/10=60000


    注:mtu的查看方法

    使用netstat -i 來查看MTU的值

    預設是 1500

    新竹網頁設計,竹北網頁設計,竹南網頁設計,中壢網頁設計,網頁設計,免費模板,免費網頁套件,架設網站,網站架設 ,修改模板,主機代管,Android App

  • 標籤:HTB, quantum, 頻寬流量,
NetYea 客服 NetYea 客服
NetYea 客服

HTB: quantum of class 10001 is big. Consider r2q change問題 -