linux内核流控(traffic control)相关概念

这里是linux内核流控相关的基本概念,具体的代码请参考kernel/net/sched/目录下的相关代码

六个基本操作

  1. Shaping
  2. Scheduling:(re)arranging queued packets.
  3. Classifying:separating packets/flows.
  4. Policing: Matching a packet/flow to a rate.
  5. Dropping: discarding a packet/flow.
  6. Marking: Modifying the packet itself.

实现机制

  1. Queues.
  2. Tokens.
  3. Buckets.

Linux 对象

  1. qdisc: the queuing discpline.
  2. class: a flexible internal queue.
  3. filter: for classifying and policing.
  4. classifier: identifying flow/packets.
  5. policer: limiting matching flows.

基本原则

  1. For shaping traffic on a link, always be the bottleneck.
  2. You can only shape trasmiited traffic.
  3. Every interface must have a qdisc.
  4. Any newly created class contains a FIFO.
  5. A classful qdisc with no children classes only consumes CPU.
  6. Classes attached directly to the root qdisc can simulate vritual circuits.
  7. A filter can be attached to classes or a classful qdisc.

Classless qdisc

  1. FIFI: first-in, first out.
  2. SFQ: stochastic fair queue.
  3. TBF: token bucket filter.
  4. GRED: generic random early drop.

Classful qdisc

  1. CBQ: Class based queue.
  2. HTB: hierarchical token bucket.
  3. PRIO: prioritizing.
  4. WRR: Weighted round robin.

SFQ

这里写图片描述

TBF

这里写图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值