EE382C Lecture 15 Quality of Service 5/19/11 EE 382C - S11 - Lecture 15
Announcements Checkpoint 2 meetings tomorrow Project presentations next week Project report due May 31st EE 382C - S11 - Lecture 15
So far Topology Routing Flow Control / Deadlock Microarchitecture – datapath/control Performance analysis Reliability Allocation/arbitration EE 382C - S11 - Lecture 15
Question of the day What impact does quality of service have to a network’s overall performance? In other words: Will the average throughput and latency suffer from QoS? EE 382C - S11 - Lecture 15
Quality of service basics Different traffic classes care about different performance metrics. They fall into two broad categories: Guaranteed service Best effort Guaranteed service provides hard guarantees as long as the injected traffic complies with some restrictions Usually volume of traffic Some traffic classes care about latency, others jitter, others throughput. Guaranteed as long as the traffic they inject complies with a set of restrictions. EE 382C - S11 - Lecture 15
Bursty flows Bursty flows affect latency and jitter of other flows using the same channels In the example below, the top flow has its latency jitter increased from 1 to 2 cycles The bursty flow gets delayed up to 4 cycles. Also, the bursty flow was delayed delayed up to four cycles while traversing the channel. EE 382C - S11 - Lecture 15
Modeling flows Two parameters: σ: Captures burstiness ρ: Average rate of flow In any time period T, the number of bits injected in a (σ, ρ) regulated flow is less or equal to σ + ρT Can regulate any flow to fit these parameters: That is, the number of bits can only exceed the average number ρT by the maximum burst size σ. Input queue to buffer the unregulated flow. This queue is served only when tokens are available in the token queue. Tokens are inserted by a rate of ρ. Burstiness (σ), is set by the depth of the queue. Regulating flows can reduce the impact of burst flows on other flows. EE 382C - S11 - Lecture 15
Calculating delays Consider the queue below with two incoming flows How would you calculate the maximum delay? Assume the queue is work conserving Longest packet delay is at most the maximum time the queue can be non-empty System needs to be stable: ρ1 + ρ2 < b So, find the adversary strategy to keep the queue non empty for the longest possible time Multiplexer is work conserving: output channel never idle if multiplexer contains packets. Second assumption: System needs to be stable: r1 + r2 < b. EE 382C - S11 - Lecture 15
The adversary strategy Three phases: Both flows send at rate b At some point, one of the flows sends at rate ρ1 to not violate its σ + ρT constraint. That happens at time: Then, both flows send at their steady-state rate. Qmax is the sum of the net amount after the three phases Dmax = t2 + tdrain Sending at rate 2b (b for each flow) fills the queue at rate b. At the second phase, the queue fills up at a rate of ρ1 At the third phase, the queue drains at a rate of b - ρ1 – ρ2 dd EE 382C - S11 - Lecture 15
Implementation of guaranteed services EE 382C - S11 - Lecture 15
Aggregate resource allocation Simplest method Require that the aggregate demand Λc of a class C is less than a bound Then the network is guaranteed not to saturate The only hardware that may be required is admission control at the inputs Gives loosest delay bounds. Many bursty inputs make more bursty outputs Network not saturated -> can guarantee lossless delivery with certain delay characteristics. No specific resources are reserved for individual flows. EE 382C - S11 - Lecture 15
Aggregate resource allocation - example Bursty: solid line. Non-burst: dotted line No way to prevent coupling of flows. Therefore jitter guarantees are hard to provide Randomized routing introduces more jitter Why does randomized (oblivious) routing introduce more jitter? Transient states. This is a 2-ary 2-fly. You can compute a delay bound for this system: refer to the book. EE 382C - S11 - Lecture 15
Resource reservation Reserve resources in the network Reserve space: virtual circuits Reserve time: time-division multiplexing (TDM) Virtual circuits reserves a path for each flow Virtual circuits avoid coupling between flows and therefore can provide stronger guarantees. ATM does virtual circuits. What is the difference between virtual circuits and circuit switching? EE 382C - S11 - Lecture 15
Time-division multiplexing TDM provides strictest controls by locking down the resources needed by a particular flow in time and space TDM divides time into slots. Each slot “belongs” to a flow Allocations can be computed offline or online Finding optimal allocations is generally NP-hard Therefore, heuristics are usually used EE 382C - S11 - Lecture 15
TDM example A timewheel is associated with each resource. Indicates the current time slot and the owner Timewheel: Basically like a FIFO where the time pointer points to one entry at any time slot. EE 382C - S11 - Lecture 15
Implementation of best-effort services Resources not completely reserved in advance The key is providing fairness among best-effort (BE) flows EE 382C - S11 - Lecture 15
Parking lot problem EE 382C - S11 - Lecture 15
Latency fairness Parking lot problem. Locally fair arbitration is not necessarily globally fair Solution: prioritize oldest packets (cars) This is called age-based arbitration What if an old packet is stuck behind a youngster? Called priority inversion Solution: Can donate priority. Any problems with this approach? Can be solved well with a non-interfering network EE 382C - S11 - Lecture 15
Throughput fairness Provide fair bandwidth to flows competing for the same resource Definitions of “fair” can change the allocation policy, especially if different flows request different amounts. What is fair for you? 0.15 0.3 EE 382C - S11 - Lecture 15
Max-min fairness Most common definition is max-min fairness An allocation is max-min fair if the allocation to any flow cannot be increased without decreasing the allocation to a flow that has an equal or lesser allocation In other words: if a flow with a smaller allocation can be increased by taking away allocated bandwidth from a larger flow, that is not max-min fairness Essentially: small flows get all they request and every other flow gets at least that much. Then the larger flows get the remaining bandwidth Which of the two allocations in the previous slide is max-min fair? How easy or complex is max-min fairness to implement? In other words: if you are a small flow, you get all you request and everybody else gets the same at least. Then, excess bandwidth goes to the larger flows. EE 382C - S11 - Lecture 15
Max-min fairness Max-min allocation algorithms satisfy the smallest requests first and any excess bandwidth for each request is distributed evenly among the remaining larger requests R0 = b Ai = min [bi, Ri/(N – i)] Ri+1 = Ri - ai Hardware implementation: separate each flow requesting a resource into a separate queue Queues are served in a round-robin fashion This is called fair queuing Higher complexity required if packets have unequal lengths or if flows have different weights bi are sorted from smallest to largest. They are the bandwidth requests. Empty queues are simply skipped over. Weighted fair queueing. EE 382C - S11 - Lecture 15
Tree saturation Traffic to hotspots forms paths of congested packets Forms as a tree Can also form in an oversubscribed network channel instead of a network terminal They interfere with packets not requesting the hot spot Hotspots are important for your project Forms as a tree: first the channels adjacent to the hotspot get backed up. Then the connected ones, etc. EE 382C - S11 - Lecture 15
Non-interfering networks A non-interfering network provides isolation between two classes A and B (or more) No resource shared between A and B can be held for ever by A (B) such that B (A) cannot interrupt the usage of that resource What kind of flow control can provide that, and how should it be configured? Virtual channel flow control, with one VC per class Can there be VCs shared between classes? Do physical channels need to be duplicated? What are the problems with non-interfering networks? Expense. Potentially hundreds of VCs are needed Therefore, the classes that actually need true isolation must be carefully chosen VC flow control provides that if there is a virtual channel for each class in the network. Physical channels do not need to be duplicated because they are reallocated each cycle, and thus cannot be held indefinitely. When we say “class” we mean that one can bypass the other. Therefore they have to be in separate VCs. You can’t have shared VCs because then you have interference: a packet in a flow will strictly depend on another packet from another flow to leave before it can be served. EE 382C - S11 - Lecture 15
Question of the day What impact does quality of service have to a network’s overall performance? In other words: Will the average throughput and latendcy suffer from QoS? EE 382C - S11 - Lecture 15
Summary of quality of service Bursty flows Increase jitter of other flows Modeling flows (σ, ρ) model Calculate delays Worst delay is the longest time a queue can be non-empty Implementation of guaranteed services Aggregate resource reservation Resource allocation. Example: time-division multiplexing Implementation of best-effort services Latency fairness Throughput fairness. Max-min fairness. Tree saturation and non-interfering networks EE 382C - S11 - Lecture 15