Presentation is loading. Please wait.

Presentation is loading. Please wait.

Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.

Similar presentations


Presentation on theme: "Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE."— Presentation transcript:

1 Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Lecture 12: Queuing disciplines

2 Univ. of TehranIntroduction to Computer Network2 Outline Router responsibility in Network Queuing discipline FIFO Fair Queuing

3 Univ. of TehranIntroduction to Computer Network3 Router Support For Conges. Traditional Internet No Congestion control initially mechanisms at end-systems, mainly implemented in TCP Routers play little role Router mechanisms affecting congestion management Scheduling Buffer management Traditional routers FIFO Tail drop

4 Univ. of TehranIntroduction to Computer Network4 Router Packet Processing Scheduling: Decide when to send a packet Decide which packet to transmit Buffer management: Decide when to drop a packet Decide which packet to drop

5 Univ. of TehranIntroduction to Computer Network5 Queuing Discipline First-In-First-Out (FIFO) does not discriminate between traffic sources Fair Queuing (FQ) explicitly segregates traffic based on flows ensures no flow captures more than its share of capacity variation: weighted fair queuing (WFQ) Problem? Flow 1 Flow 2 Flow 3 Flow 4 Round-robin service

6 Univ. of TehranIntroduction to Computer Network6 FIFO: First-In First-Out Maintain a queue to store all packets When to send? When there is at least a packet in the queue Which packet to send? The packet at the head of the queue Queued packets Arriving packet Next to transmit

7 Univ. of TehranIntroduction to Computer Network7 Tail-drop Buffer Management When to drop? When buffer is full Which packet to drop The arriving packet Arriving packet Next to transmit Drop

8 Univ. of TehranIntroduction to Computer Network8 Drawbacks of FIFO with Tail- drop Synchronizing effect for multiple TCP flows Buffer lock out by misbehaving flows Burst or multiple consecutive packet drops

9 Univ. of TehranIntroduction to Computer Network9 Synchronizing effect for multiple TCP flows When buffer overflows many/all flows experience losses Flows which experience losses will scale down their transmission (by reducing the window size) This will cause the link to be underutilized … the process repeats Net result: inefficient link utilization

10 Univ. of TehranIntroduction to Computer Network10 Buffer Lock Out by Misbehaving Flows “Aggressive” flows can squeeze out TCP flows Example: one 10 Mbps link shared by 1 UDP flow that sends at 10 Mbps, and does not implement any congestion control 31 TCP flows UDP Bottleneck link (10 Mbps) UDP (#1) - 10 Mbps TCP (#2) TCP (#32)... UDP (#1) TCP (#2) TCP (#32)...

11 Univ. of TehranIntroduction to Computer Network11 Burst of Packet Losses A TCP flow sends a burst of packets that arrive at a router when buffer is full All packets in the burst are lost This may cause RTO to trigger: cwnd  1 For example, with TCP Reno if there are three packet losses in a window, this will almost sure trigger an RTO

12 Univ. of TehranIntroduction to Computer Network12 FIFO Router with Two TCP Flows

13 Univ. of TehranIntroduction to Computer Network13 RED Router with Two TCP Sessions

14 Univ. of TehranIntroduction to Computer Network14 Solution? Round-robin among different flows [Nagle ‘87] one queue per flow

15 Univ. of TehranIntroduction to Computer Network15 Round-Robin Discussion Advantages: protection among flows Misbehaving flows will not affect the performance of well-behaving flows Misbehaving flow – a flow that does not implement any congestion control FIFO does not have such a property Disadvantages: More complex than FIFO: per flow queue/state Biased toward large packets – a flow receives service proportional to the length of packets (When is this bad?)

16 Univ. of TehranIntroduction to Computer Network16 Solution? Bit-by-bit round robin Can you do this in practice? No, packets cannot be preempted (why?) …we can only approximate it

17 Univ. of TehranIntroduction to Computer Network17 Fair Queueing (FQ) [DKS’89] Define a fluid flow system: a system in which flows are served bit-by-bit Then serve packets in the increasing order of their deadlines Advantages Each flow will receive exactly its fair rate Work conserving

18 Univ. of TehranIntroduction to Computer Network18 FQ Algorithm Suppose clock ticks each time a bit is transmitted Let P i denotes the length, S i the time start to transmit and F i denote the time when finish transmitting of packet i, then, F i = S i + P i When does router start transmitting packet i? if before router finished packet i - 1 from this flow, then immediately after last bit of i - 1 (F i-1 ) if no current packets for this flow, then start transmitting when arrives (call this A i ) Thus: F i = MAX (F i - 1, A i ) + P i

19 Univ. of TehranIntroduction to Computer Network19 Implementing Fair Queueing Idea: serve packets in the order in which they would have finished transmission in the fluid flow system

20 Univ. of TehranIntroduction to Computer Network20 FQ Algorithm (cont) For multiple flows calculate F i for each packet that arrives on each flow treat all F i ’s as timestamps next packet to transmit is one with lowest timestamp Not perfect: can’t preempt current packet Flow 1Flow 2 (a)(b) Output F = 8 F = 10 F = 5 F = 10 F = 2 Flow 1 (arriving) Flow 2 (transmitting)

21 Univ. of TehranIntroduction to Computer Network21 Example 12345 1234 12 3 12 4 34 5 56 12132344 56 556 Flow 1 (arrival traffic) Flow 2 (arrival traffic) Service in fluid flow system Packet system time

22 Univ. of TehranIntroduction to Computer Network22 FQ Advantages FQ protect well-behaved flows from ill- behaved flows Example: 1 UDP (10 Mbps) and 31 TCP’s sharing a 10 Mbps link

23 Univ. of TehranIntroduction to Computer Network23 Big Picture FQ does not eliminate congestion  it just manages the congestion You need both end-host congestion control and router support for congestion control end-host congestion control to adapt router congestion control to protect/isolate Don’t forget buffer management: you still need to drop in case of congestion. Which packet’s would you drop in FQ? one possibility: packet from the longest queue


Download ppt "Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE."

Similar presentations


Ads by Google