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

根据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.

> tc qdisc add dev eth0 root handle 1: htb default 10

Default r2q = 10.

> tc class add dev eth0 parent 1: classid 1:1 htb rate 100mbit burst 2k

> tc class add dev eth0 parent 1:1 classid 1:10 htb rate 80mbit ceil 100mbit

> burst 2k

>

> tc class add dev eth0 parent 1:1 classid 1:11 htb rate 128kbit burst 2k

> tc class add dev eth0 parent 1:11 classid 1:21 htb rate 16kbit ceil 56kbit

> burst 2k

> tc class add dev eth0 parent 1:11 classid 1:22 htb rate 16kbit ceil 40kbit

> burst 2k

> tc class add dev eth0 parent 1:11 classid 1:23 htb rate 16kbit ceil 72kbit

> burst 2k

> tc class add dev eth0 parent 1:11 classid 1:24 htb rate 16kbit ceil 64kbit

> burst 2k

> tc class add dev eth0 parent 1:11 classid 1:25 htb rate 16kbit ceil 40kbit

> burst 2k

> tc class add dev eth0 parent 1:11 classid 1:26 htb rate 16kbit ceil 40kbit

> burst 2k

> tc class add dev eth0 parent 1:11 classid 1:27 htb rate 16kbit ceil 32kbit

> burst 2k

> tc class add dev eth0 parent 1:11 classid 1:28 htb rate 16kbit ceil 56kbit

> burst 2k

Smallest rate : 16kbit = 2 kilobyt / r2q (=10) = 200.  And this is < 1500.  So

you get warnings.

Biggest rate : 100mbit = 12.5 mbyte / r2q = 1.2 Mbyte > 60.000.  So you get

warnings.

If you do

tc qdisc add dev eth0 root handle 1: htb default 10 r2q 1

Smallest rate : 16kbit = 2kilobyte / r2k = 2000.  And this is > 1500.  So no

warnings.

Biggest rate : 100mbit = 12.5 mbyte / r2q = 12.5 Mbyte > 60.000.  So you get

warnings.  But you can overrule the quantum :

tc class add dev eth0 parent 1:1 classid 1:11 htb rate 128kbit burst 2k

quantum 60000

Quantum is used when 2 classes are getting more bandwidth then the rate.   So

it's only important for sharing the remaining bandwidth.  In that case, each

class may send quantum bytes.

TC HTB r2q的更多相关文章

  1. linux 下使用 tc 模拟网络延迟和丢包(转)

    1 模拟延迟传输简介 netem 与 tc: netem 是 Linux 2.6 及以上内核版本提供的一个网络模拟功能模块.该功能模块可以用来在性能良好的局域网中,模拟出复杂的互联网传输性能,诸如低带 ...

  2. linux 下使用 tc 模拟网络延迟和丢包

    1 模拟延迟传输简介 netem 与 tc: netem 是 Linux 2.6 及以上内核版本提供的一个网络模拟功能模块.该功能模块可以用来在性能良好的局域网中,模拟出复杂的互联网传输性能,诸如低带 ...

  3. linux 流量控制全攻略(TC)

    TC很是强大啊,很多所谓的硬件路由器,都是基于这个做的. TC介绍 在linux中,TC有二种控制方法CBQ和HTB.HTB是设计用来替换CBQ的.它是一个层次式的过滤框架.TC包括三个基本的构成块: ...

  4. 【转载】linux下使用 TC 对服务器进行流量控制

    tc 介绍 在linux中,tc 有二种控制方法 CBQ 和 HTB.HTB 是设计用来替换 CBQ 的.HTB比CBQ更加灵活,但是CPU 开销也更大,通常高速的链路会使用CBQ,一般而言HTB使用 ...

  5. iproute2和tc的高级路由用法

    #Linux advanced router ip link show #显示链路 ip addr show #显示地址(或ifconfig) ip route show #显示路由(route -n ...

  6. linux下使用 TC 对服务器进行流量控制

    tc 介绍 在linux中,tc 有二种控制方法 CBQ 和 HTB.HTB 是设计用来替换 CBQ 的.HTB比CBQ更加灵活,但是CPU 开销也更大,通常高速的链路会使用CBQ,一般而言HTB使用 ...

  7. tc/traffic control 网络控制工具

    第一个例子 增加延时 tc qdsic add dev enp0s3 root netem delay 200ms qdisc : queuing discipline, 当内核需要发送包到某个接口时 ...

  8. shell 实例

    转载自:https://github.com/liquanzhou/ops_doc    这里只作为笔记使用,不做他用 shell实例手册 0 说明{ 手册制作: 雪松 更新日期: 2018-09-1 ...

  9. [转帖]Shell运维手册

    shell实例手册    https://github.com/liquanzhou/ops_doc   0 说明{       手册制作: 雪松   更新日期: 2018-09-11       欢 ...

随机推荐

  1. json_encode时中文编码转正常状态

    function json_encode_cn($data) { $data = json_encode($data); return preg_replace("/\\\u([0-9a-f ...

  2. [Js]面向对象的选项卡实例

    中间过渡环节:把面向过程的程序,改写成面向对象的形式 <html xmlns="http://www.w3.org/1999/xhtml"><head>&l ...

  3. S1:new操作符

    function Shape(type){ this.type = type || "rect"; this.calc = function(){ return "cal ...

  4. android webview 漏洞背后的节操

    by superhei 2013/09/06 [注:本文提到的都是我个人的观点,该行为也是私人行为,与任何组织.公司无关.另:水军请自重!] 一.前言   这两天,一个2+年前的android web ...

  5. FOJ 2105 Digits Count

    题意:对一串数字进行抑或某数,和某数,或某数,统计某区间和的操作. 思路:因为化成二进制就4位可以建4颗线段树,每颗代表一位二进制. and 如果该为是1  直接无视,是0则成段赋值为0: or  如 ...

  6. IBatis.Net系列-多参数的SQL语句的配置

    我们在使用IBatis.net操作数据的时候,肯定会碰到SQL参数当我们有一个参数时,IBatis的xml映射文件如下: <statement id="getProduct" ...

  7. 【未完成0.0】Noip2012提高组day2 解题报告

    第一次写一套题的解题报告,感觉会比较长.(更新中Loading....):) 题目: 第一题:同余方程 描述 求关于x的同余方程ax ≡ 1 (mod b)的最小正整数解. 格式 输入格式 输入只有一 ...

  8. 数据结构-Vector

    自定义Vector实现: /////////////////////////////////////////////////////////////////////////////// // // F ...

  9. UITableViewCell Property “icon” cannot be found in forward class object “DJWeiBo”

    UITableViewCell 自定义表格 实体属性不显示错误 Property “icon” cannot be found in forward class object “DJWeiBo”引入实 ...

  10. 【转】 JAR、WAR、EAR的使用和区别

    Jar.war.EAR.在文件结构上,三者并没有什么不同,它们都采用zip或jar档案文件压缩格式.但是它们的使用目的有所区别: Jar文件(扩展名为. Jar,Java Application Ar ...