linux内核流控(traffic control)相关概念
2016-05-27 13:54
495 查看
这里是linux内核流控相关的基本概念,具体的代码请参考kernel/net/sched/目录下的相关代码
六个基本操作
Shaping
Scheduling:(re)arranging queued packets.
Classifying:separating packets/flows.
Policing: Matching a packet/flow to a rate.
Dropping: discarding a packet/flow.
Marking: Modifying the packet itself.
实现机制
Queues.
Tokens.
Buckets.
Linux 对象
qdisc: the queuing discpline.
class: a flexible internal queue.
filter: for classifying and policing.
classifier: identifying flow/packets.
policer: limiting matching flows.
基本原则
For shaping traffic on a link, always be the bottleneck.
You can only shape trasmiited traffic.
Every interface must have a qdisc.
Any newly created class contains a FIFO.
A classful qdisc with no children classes only consumes CPU.
Classes attached directly to the root qdisc can simulate vritual circuits.
A filter can be attached to classes or a classful qdisc.
Classless qdisc
FIFI: first-in, first out.
SFQ: stochastic fair queue.
TBF: token bucket filter.
GRED: generic random early drop.
Classful qdisc
CBQ: Class based queue.
HTB: hierarchical token bucket.
PRIO: prioritizing.
WRR: Weighted round robin.
SFQ
TBF
六个基本操作
Shaping
Scheduling:(re)arranging queued packets.
Classifying:separating packets/flows.
Policing: Matching a packet/flow to a rate.
Dropping: discarding a packet/flow.
Marking: Modifying the packet itself.
实现机制
Queues.
Tokens.
Buckets.
Linux 对象
qdisc: the queuing discpline.
class: a flexible internal queue.
filter: for classifying and policing.
classifier: identifying flow/packets.
policer: limiting matching flows.
基本原则
For shaping traffic on a link, always be the bottleneck.
You can only shape trasmiited traffic.
Every interface must have a qdisc.
Any newly created class contains a FIFO.
A classful qdisc with no children classes only consumes CPU.
Classes attached directly to the root qdisc can simulate vritual circuits.
A filter can be attached to classes or a classful qdisc.
Classless qdisc
FIFI: first-in, first out.
SFQ: stochastic fair queue.
TBF: token bucket filter.
GRED: generic random early drop.
Classful qdisc
CBQ: Class based queue.
HTB: hierarchical token bucket.
PRIO: prioritizing.
WRR: Weighted round robin.
SFQ
TBF
相关文章推荐
- Linux Kernel 4.0 RC5 发布!
- 神器SystemTap
- 解读Linux安全机制之栈溢出保护
- 簡單設定 kernel 選項在使用 iptables 前
- Ubuntu12.04内核升级出了问题
- [Linux学习笔记] Linux系统引导流程(一)
- 更新Debian内核e1000e驱动模块
- Linux Kernel 4.5在3月15日发布最终版
- kernel: printk: 2 messages suppressed.
- linux 内核 hash table 的使用
- Linux Kernel Panic报错解决思路
- kernel: TCP: time wait bucket table overflow错误的解决办法
- linux安全相关
- 内核的主要配置文件的详细说明
- Linux Kernel 2.6.32 Local Root Exploit (x86_64)
- LINUX ulimit命令详解
- Linux Kernel kNFSd 整数溢出 拒绝服务漏洞 .
- 基于busybox和linux kernel制作小linux
- Linux IPv4代码分析系列(1)
- linux 升级kernel