您的位置:首页 > 运维架构 > Linux

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

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  kernel linux kernel qdisc