115-441 Computer NetworkingLecture 22 – Queue Management andQoSLecture 22: 2006-11-14 2Overview• Queue management & RED• Fair-queuing• Why QOS?• Integrated servicesLecture 22: 2006-11-14 3Queuing Disciplines• Each router must implement some queuingdiscipline• Queuing allocates both bandwidth and bufferspace:• Bandwidth: which packet to serve (transmit) next• Buffer space: which packet to drop next (whenrequired)• Queuing also affects latencyLecture 22: 2006-11-14 4Typical Internet Queuing• FIFO + drop-tail• Simplest choice• Used widely in the Internet• FIFO (first-in-first-out)• Implies single class of traffic• Drop-tail• Arriving packets get dropped when queue is full regardless of flowor importance• Important distinction:• FIFO: scheduling discipline• Drop-tail: drop policy2Lecture 22: 2006-11-14 5FIFO + Drop-tail Problems• Leaves responsibility of congestion controlcompletely to the edges (e.g., TCP)• Does not separate between different flows• No policing: send more packets get moreservice• Synchronization: end hosts react to same eventsLecture 22: 2006-11-14 6FIFO + Drop-tail Problems• Full queues• Routers are forced to have have large queues tomaintain high utilizations• TCP detects congestion from loss• Forces network to have long standing queues in steady-state• Lock-out problem• Drop-tail routers treat bursty traffic poorly• Traffic gets synchronized easily allows a few flows tomonopolize the queue spaceLecture 22: 2006-11-14 7Active Queue Management• Design active router queue management to aidcongestion control• Why?• Router has unified view of queuing behavior• Routers see actual queue occupancy (distinguishqueue delay and propagation delay)• Routers can decide on transient congestion, based onworkloadLecture 22: 2006-11-14 8Design Objectives• Keep throughput high and delay low• High power (throughput/delay)• Accommodate bursts• Queue size should reflect ability to accept burstsrather than steady-state queuing• Improve TCP performance with minimal hardwarechanges3Lecture 22: 2006-11-14 9Lock-out Problem• Random drop• Packet arriving when queue is full causes some randompacket to be dropped• Drop front• On full queue, drop packet at head of queue• Random drop and drop front solve the lock-outproblem but not the full-queues problemLecture 22: 2006-11-14 10Full Queues Problem• Drop packets before queue becomes full(early drop)• Intuition: notify senders of incipientcongestion• Example: early random drop (ERD):• If qlen > drop level, drop each new packet withfixed probability p• Does not control misbehaving usersLecture 22: 2006-11-14 11Random Early Detection (RED)• Detect incipient congestion• Assume hosts respond to lost packets• Avoid window synchronization• Randomly mark packets• Avoid bias against bursty trafficLecture 22: 2006-11-14 12RED Algorithm• Maintain running average of queue length• If avg < minth do nothing• Low queuing, send packets through• If avg > maxth, drop packet• Protection from misbehaving sources• Else mark packet in a manner proportional toqueue length• Notify sources of incipient congestion4Lecture 22: 2006-11-14 13RED OperationMin threshMax threshAverage Queue LengthminthmaxthmaxP1.0Avg queue lengthP(drop)Lecture 22: 2006-11-14 14Overview• Queue management & RED• Fair-queuing• Why QOS?• Integrated servicesLecture 22: 2006-11-14 15Fairness Goals• Allocate resources fairly• Isolate ill-behaved users• Router does not send explicit feedback to source• Still needs e2e congestion control• Still achieve statistical muxing• One flow can fill entire pipe if no contenders• Work conserving scheduler never idles link if it has apacketLecture 22: 2006-11-14 16What is Fairness?• At what granularity?• Flows, connections, domains?• What if users have different RTTs/links/etc.• Should it share a link fairly or be TCP fair?• Maximize fairness index?• Fairness = (Σxi)2/n(Σxi2) 0<fairness<1• Basically a tough question to answer – typically designmechanisms instead of policy• User = arbitrary granularity5Lecture 22: 2006-11-14 17Max-min Fairness• Allocate user with “small” demand what it wants,evenly divide unused resources to “big” users• Formally:• Resources allocated in terms of increasing demand• No source gets resource share larger than its demand• Sources with unsatisfied demands get equal share of resourceLecture 22: 2006-11-14 18Implementing Max-min Fairness• Generalized processor sharing• Fluid fairness• Bitwise round robin among all queues• Why not simple round robin?• Variable packet length can get more service bysending bigger packets• Unfair instantaneous service rate• What if arrive just before/after packet departs?Lecture 22: 2006-11-14 19Bit-by-bit RR• Single flow: clock ticks when a bit is transmitted.For packet i:• Pi = length, Ai = arrival time, Si = begin transmit time, Fi= finish transmit time• Fi = Si+Pi = max (Fi-1, Ai) + Pi• Multiple flows: clock ticks when a bit from allactive flows is transmitted round number• Can calculate Fi for each packet if number of flows isknow at all times• Why do we need to know flow count? need to know A Thiscan be complicatedLecture 22: 2006-11-14 20Bit-by-bit RR Illustration• Not feasible tointerleave bits on realnetworks• FQ simulates bit-by-bitRR6Lecture 22: 2006-11-14 21Fair Queuing• Mapping bit-by-bit schedule onto packettransmission schedule• Transmit packet with the lowest Fi at any giventime• How do you compute Fi?Lecture 22: 2006-11-14 22FQ IllustrationFlow 1Flow 2Flow nI/PO/PVariation: Weighted Fair Queuing (WFQ)Lecture 22: 2006-11-14 23Bit-by-bit RR ExampleF=10Flow 1(arriving)Flow 2transmittingF=2OutputF=5F=8Flow 1 Flow 2OutputF=10Cannot preempt packetcurrently being transmittedLecture 22: 2006-11-14 24Fair Queuing Tradeoffs• FQ can control congestion by monitoring flows• Non-adaptive flows can still be a problem – why?• Complex state• Must keep queue per flow• Hard in routers with many flows (e.g., backbone routers)• Flow aggregation is a possibility (e.g. do fairness per domain)• Complex computation• Classification into flows may be hard• Must keep queues sorted by finish times• dR/dt changes whenever the flow count changes7Lecture 22: 2006-11-14 25Overview• Queue management & RED• Fair-queuing• Why QOS?• Integrated
View Full Document