Mars Router - Stanford University

Download Report

Transcript Mars Router - Stanford University

EE382C
Lecture 15
Quality of Service
5/19/11
EE 382C - S11 - Lecture 15
1
Announcements
• Checkpoint 2 meetings tomorrow
• Project presentations next week
• Project report due May 31st
EE 382C - S11 - Lecture 15
2
So far
•
•
•
•
•
•
•
Topology
Routing
Flow Control / Deadlock
Microarchitecture – datapath/control
Performance analysis
Reliability
Allocation/arbitration
EE 382C - S11 - Lecture 15
3
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
4
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
EE 382C - S11 - Lecture 15
5
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.
EE 382C - S11 - Lecture 15
6
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:
EE 382C - S11 - Lecture 15
7
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
EE 382C - S11 - Lecture 15
8
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: t1   1 /(b  1)
– Then, both flows send at their steady-state rate.
• Qmax is the sum of the net amount after the three phases
• Dmax = t2 + tdrain
EE 382C - S11 - Lecture 15
9
Implementation of guaranteed
services
EE 382C - S11 - Lecture 15
10
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
EE 382C - S11 - Lecture 15
11
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
EE 382C - S11 - Lecture 15
12
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
EE 382C - S11 - Lecture 15
13
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
14
TDM example
• A timewheel is associated with each resource. Indicates the
current time slot and the owner
EE 382C - S11 - Lecture 15
15
Implementation of best-effort
services
Resources not completely reserved in
advance
The key is providing fairness among besteffort (BE) flows
EE 382C - S11 - Lecture 15
16
Parking lot problem
EE 382C - S11 - Lecture 15
17
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
18
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
0.3
EE 382C - S11 - Lecture 15
19
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 maxmin fair?
• How easy or complex is max-min fairness to implement?
EE 382C - S11 - Lecture 15
20
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
EE 382C - S11 - Lecture 15
21
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
EE 382C - S11 - Lecture 15
22
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
EE 382C - S11 - Lecture 15
23
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
24
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
25