QoS

WRR/DRR/WFQ

WRR

 

// calculate number of packets to be served each round by connections

for each flow f
   f.normalized_weight = f.weight / f.mean_packet_size

min = findSmallestNormalizedWeight

for each flow f
   f.packets_to_be_served = f.normalized_weight / min

// main loop
loop
   for each non-empty flow queue f
      min(f.packets_to_be_served, f.packets_waiting).times do
         servePacket f.getPacket

WRR for network packet scheduling was first proposed by Katevenis, Sidiropoulos and Courcoubetis in 1991, specifically for scheduling in ATM networks using fixed size packets (cells). In the more general case of IP networks with variable size packets, in order to approximate GPS the weight factors must be adjusted based on the packet size

WFQ

WFQ选择离开时刻最早的包进行发送。

packet.virFinish = virStart + packet.size / Ri

Ri = R * Wi/(W1+W2+...+Wn)

DRR

Deficit Round Robin, 也叫DWRR

为每个queue分配一个quantum,则该queue的长期总体传输速率为R * Qi/(Q1+Q2+...+Qn)

Variables and Constants
   const integer N             // Nb of queues
   const integer Q[1..N]       // Per queue quantum 
   integer DC[1..N]            // Per queue deficit counter
   queue queue[1..N]           // The queues   

Scheduling Loop
while (true)
    for i in 1..N       
        if not queue[i].empty()
            DC[i]:= DC[i] + Q[i]
            while( not queue[i].empty() and
                         DC[i] >= queue[i].head().size() )
                DC[i]:= DC[i] - queue[i].head().size()
                send( queue[i].head() )
                queue[i].dequeue()
            end while 
            if queue[i].empty()
                DC[i]:= 0
            end if
        end if
    end for
end while

Head of Line 和 VOQ

Head of Line

Head-of-line blocking example: The 1st and 3rd input flows are competing to send packets to the same output interface. In this case if the switching fabric decides to transfer the packet from the 3rd input flow, the 1st input flow cannot be processed in the same clock cycle. Note that the 1st input flow is blocking a packet for output interface 3, which is available for processing.

VOQ

the physical buffer of each input port maintains a separate virtual queue for each output port. Therefore congestion on an egress port will block only the virtual queue for this particular egress port. Other packets in the same physical buffer destined to different (non-congested) output ports are in separate virtual queues and can therefore still be processed

SrTcm 和 TrTcm

rfc2697, rfc2698

 

转载于:https://www.cnblogs.com/realplay/p/10910758.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值