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. linux-网卡故障

    Linux 网络问题解决思路 1.查看 /etc/sysconfig/network-script/ 查看eth0和eth1的配置是否正确 2.查看 /etc/modual.conf 的配置模块是否正 ...

  2. placeholder在IE8中兼容性问题解决

    placeholder是HTML5中的一个属性,可以在文本框中设置placeholder属性来显示一些提示性的文字,但对IE10以下的浏览器不支持,下面方法可以让placeholder能够使用在IE1 ...

  3. Program L 暴力求解

    Description The GeoSurvComp geologic survey company is responsible for detecting underground oil dep ...

  4. Autolayout-VFL语言添加约束

    一.VFL语言简洁 VFL(Visual format language)语言是苹果为了简化手写Autolayout代码所创建的专门负责编写约束的代码.为我们简化了许多代码量. 二.使用步骤 使用步骤 ...

  5. Matlab与C/C++联合编程之Matlab以MEX方式调用C/C++代码(三)

    最近写了个Matlab程序,好慢呐……所以开始学习Matlab与C/C++混合编程.下面写了个测试代码,显示一个Double类型矩阵中的元素. 源代码 #include "mex.h&quo ...

  6. 记录一些容易忘记的属性 -- NSTimer

    使定时器停止的方法: 1. //将定时器的启动时间设置为很久以后的将来,到这个时间,定时器才会开始工作            [_timer setFireDate:[NSDate distantFu ...

  7. python常见错误总结

    TypeError: 'module' object is not callable 模块未正确导入,层级关系没找对 缩进错误. IndentationError: unindent does not ...

  8. Embedded binary is not signed with the same certificate as the parent app

    I face the same issue too,I solve it by this: First, I reCreate my team develop certificate(Because ...

  9. Typographical Concepts

    Glyph(字形) A glyph is an element of writing: an individual mark on a written medium that contributes ...

  10. poj2392 多重背包

    //Accepted 868 KB 188 ms //多重背包 #include <cstdio> #include <cstring> #include <iostre ...