64
CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

  • View
    225

  • Download
    1

Embed Size (px)

Citation preview

Page 1: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

CS 268: Lecture 17(Dynamic Packet State)

Ion Stoica

April 15, 2002

Page 2: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 2

What is the Problem?

Internet has limited resources and management capabilities- Prone to congestion, and denial of service

- Cannot provide guarantees

Existing solutions- Stateless – scalable and robust, but weak network services

- Stateful – powerful services, but much less scalable and robust

Page 3: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 3

Stateless vs. Stateful Solutions

Stateless solutions – routers maintain no fine grained state about traffic scalable, robust weak services

Stateful solutions – routers maintain per-flow state powerful services

• guaranteed services + high resource utilization

• fine grained differentiation

• protection much less scalable and robust

Page 4: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 4

Existing Solutions

Stateful Stateless

QoS

Tenet [Ferrari & Verma ’89] Intserv [Clark et al ’91] ATM [late ’80s]

Diffserv - [Clark & Wroclawski ‘97] - [Nichols et al ’97]

Network support for congestion control

Round Robin [Nagle ’85] Fair Queueing [Demers et al ’89] Flow Random Early Drop (FRED) [Lin & Morris ’97]

DecBit [Ramkrishnan & Jain ’88] Random Early Detection (RED) [Floyd & Jacobson ’93] BLUE [Feng et al ’99]

Page 5: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 5

Stateful Solution: Guaranteed Services

SenderReceiver

Achieve per-flow bandwidth and delay guarantees- Example: guarantee 1MBps and < 100 ms delay to a flow

Page 6: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 6

Stateful Solution: Guaranteed Services

SenderReceiver

Allocate resources - perform per-flow admission control

Page 7: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 7

Stateful Solution: Guaranteed Services

SenderReceiver

Install per-flow state

Page 8: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 8

SenderReceiver

Challenge: maintain per-flow state consistent

Stateful Solution: Guaranteed Services

Page 9: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 9

Stateful Solution: Guaranteed Services

SenderReceiver

Per-flow classification

Page 10: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 10

Stateful Solution: Guaranteed Services

SenderReceiver

Per-flow buffer management

Page 11: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 11

Stateful Solution: Guaranteed Services

SenderReceiver

• Per-flow scheduling

Page 12: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 12

Stateful Solution Complexity

Data path- Per-flow classification

- Per-flow buffer

management

- Per-flow scheduling

Control path- install and maintain

per-flow state for

data and control pathsClassifier

Buffermanagement

Scheduler

flow 1

flow 2

flow n

output interface

Per-flow State

Page 13: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 13

Stateless vs. Stateful

Stateless solutions are more- scalable

- robust

Stateful solutions provide more powerful and flexible services

- guaranteed services + high resource utilization

- fine grained differentiation

- protection

Page 14: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 14

Question

Can we achieve the best of two worlds, i.e., provide services implemented by stateful networks while maintaining advantages of stateless architectures?

Page 15: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 15

Answer

Yes, at least in some interesting cases:- guaranteed services [Stoica and Zhang, SIGCOMM’99]

- network support for congestion control: Core-Stateless Fair Queueing [Stoica et al, SIGCOMM’98]

- service differentiation [Stoica and Zhang, NOSSDAV’98]

Page 16: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 16

Solution: SCORE architecture and DPS technique Example: providing guaranteed services Conclusions

Outline

Page 17: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 17

Scalable Core (SCORE)

A trusted and contiguous region of network in which - edge nodes – perform per flow management

- core nodes – do not perform per flow management

core nodes edge nodesedge nodes

Page 18: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 18

The Approach

1. Define a reference stateful network that implements the desired service

Reference Stateful Network

SCORE Network

2. Emulate the functionality of the reference network in a SCORE network

Page 19: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 19

The Idea

Instead of having core routers maintaining per-flow state have packets carry per-flow state

Reference Stateful Network SCORE Network

Page 20: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 20

The Technique: Dynamic Packet State (DPS)

Ingress node: compute and insert flow state in packet’s header

Page 21: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 21

The Technique: Dynamic Packet State (DPS)

Ingress node: compute and insert flow state in packet’s header

Page 22: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 22

The Technique: Dynamic Packet State (DPS)

Core node: - process packet based on state it carries and node’s state

- update both packet and node’s state

Page 23: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 23

The Technique: Dynamic Packet State (DPS)

Egress node: remove state from packet’s header

Page 24: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 24

Solution: SCORE architecture and DPS technique Example: providing guaranteed services Conclusions

Outline

Page 25: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 25

Why Guaranteed Service Example?

Illustrate power and flexibility of our solution- guaranteed service - strongest semantic service proposed in

context of stateful networks

guaranteedservices

statisticalservices

differentiatedservices

congestioncontrol supportbest-effort

service quality betterworse

Page 26: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 26

Example: Guaranteed Services

Goal: provide per-flow delay and bandwidth guarantees How: emulate ideal model in which each flow traverses

dedicated links of capacity r

Per-hop packet service time = (packet length) / r

r r rflow(reservation = r )

Page 27: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 27

Guaranteed Services

Define reference network to implement service - control path: per-flow admission control, reserve capacity r on each

link

- data path: enforce ideal model, by using Jitter Virtual Clock (Jitter-VC) scheduler

Reference Stateful Network

Jitter-VC Jitter-VC Jitter-VCJitter-VC

Jitter-VCJitter-VCJitter-VC

Page 28: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 28

Guaranteed Services

Use DPS to eliminate per-flow state in core - control path: emulate per-flow admission control

- data path: emulate Jitter-VC by Core-Jitter Virtual Clock (CJVC)

Reference Stateful Network SCORE Network

Jitter-VC Jitter-VC Jitter-VCJitter-VC

Jitter-VCJitter-VCJitter-VC

CJVCCJVC

CJVC

CJVC

CJVC

CJVC

Page 29: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 29

Solution: SCORE architecture and DPS technique Example: providing guaranteed services

Eliminate per-flow state on data path

- Eliminate per-flow state on control path

- Implementation and experimental results

Conclusions

Outline

Page 30: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 30

Data Path

Ideal Model

Stateful solution: Jitter Virtual Clock

Stateless solution: Core-Jitter Virtual Clock

Page 31: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 31

Ideal Model: Example

time

1

2

3

4

packet arrival timepacket transmission time (service) in ideal model

p1 arrival p2 arrival

length(p2) / rlength(p1) / r

Page 32: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 32

Stateful Solution: Jitter Virtual Clock (Jitter-VC)

time

• With each packet associate – eligible time – start time of serving packet in ideal model– deadline – finish time of serving packet in ideal model

eligible times

deadlines

1

2

3

4

Page 33: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 33

Jitter-VC

time

• Algorithm: schedule eligible packets in increasing order of their deadlines

• Property: guarantees that all packets meet their deadlines

eligible times

deadlines

1

2

3

4

Page 34: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 34

Jitter-VC: Eligible Time Computation

Minimum between- arrival time

- deadline at previous node + propagation delay

- deadline of previous packet

timeeligible time = packet deadline at previous node

eligible time = arrival time

1

2

3

4

Page 35: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 35

Jitter-VC: Eligible Time Computation

time

eligible time = arrival time

eligible time = packet deadline at prev. node

eligible time = prev.packet deadline

using previous packet’s deadline per flow state

Minimum between- arrival time

- deadline at previous node + propagation delay

- deadline of previous packet

1

2

3

4

Page 36: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 36

Stateless Solution: Core-Jitter Virtual Clock (CJVC)

time

Goal: eliminate per-flow state- eliminate dependency on previous packet deadline

1

2

3

4

Page 37: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 37

Core-Jitter Virtual Clock (CJVC)

Solution: make eligible time greater or equal to previous packet deadline

time

1

2

3

4

Page 38: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 38

Core-Jitter Virtual Clock (CJVC)

time

How: associate to each packet a slack variable s Delay eligible time at each node by s

1

2

3

4

s

eligible time = packet deadline at prev. node + s

Page 39: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 39

Theorem: CJVC and Jitter-VC provide the same end-to-end delay bounds

s can be computed at ingress: depends on- current and previous packet eligible times (e and ep)

- current and previous packet lengths (lp and l)

- slack variable associated to previous packet (sp)

- flow reservation (r)

- number of hops (h) – computed at admission time

CJVC Properties

1

/,0max

h

rlee

r

llss ppp

p

Page 40: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 40

CJVC Algorithm

Each packet carries in its header three variable- slack variable s (computed and inserted by ingress)

- flow’s reserved rate r (inserted by ingress)

- ahead of schedule a (inserted by previous node)

Eligible time = arrival time + a + s Deadline = eligible time + (packet length) / r NOTE:

- using a instead of the deadline at previous node no need for synchronized clocks

Page 41: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 41

Jitter-VC: Core Router

Data path- Per-flow classification

- Per-flow buffer

management

- Per-flow scheduling

Control path- install and maintain

per-flow state for

data and control pathsClassifier

Buffermanagement

Scheduler

flow 1

flow 2

flow n

Per flowl State

Page 42: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 42

Data path- Per-flow classification

- Per-flow buffer

management

- Per-packet scheduling

Control path- Install and maintain

per-flow state for

data and control paths

CJVC: Core Router

Buffermanagement

Scheduler

Control State

Page 43: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 43

Motivations: what is the problem and why it is important? Existing solutions Solution: SCORE architecture and DPS technique Example: providing guaranteed services

- Eliminate per-flow state on data pathEliminate per-flow state on control path

- Implementation and experimental results

Conclusions

Outline

Page 44: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 44

Control Path: Admission Control

Goal: reserve resources (bandwidth) for each flow along its path

Approach: light-weight protocol that does not require core nodes to maintain per-flow state

yes yes yes

yes

Page 45: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 45

Per-hop Admission Control

A node admits a reservation r, if - C – output link capacity

- R – aggregate reservation:

Need: maintain aggregate reservation R Problem: it requires per flow state to handle partial

reservation failures and message loss

i

irR

RCr

Page 46: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 46

Solution

1. Estimate aggregate reservation Rest

2. Account for approximations and compute an upper bound Rbound , i.e., Rbound >= R

3. Use Rbound , instead of R, to perform admission control, i.e., admit a reservation r if

boundRCr

Page 47: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 47

Observation: If all flows were sending at their reserved rates, computing Rest is trivial:

- just measure the traffic throughput, e.g.,

where S(a, a+T) contains all packets of all flows received during [a, a+T)

Estimating Aggregate Reservation (Rest)

T

ilength

R TaaSiest

),(

)(

Mbpsr 21

Mbpsr 32

MbpsRest 5

Page 48: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 48

Virtual Length

• Problem: What if flows do not send at their reserved rates ?

Page 49: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 49

Virtual Length

• Problem: What if flows do not send at their reserved rates ?• Solution: associate to each packet a virtual length such that

– if lengths of all packets of a flow were equal to their virtual lengths, the flow sends at its reserved rate

• Then, use virtual lengths instead of actual packet lengths to compute Rest

Page 50: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 50

Virtual Length

Definition:

- r – flow reserved rate

- crt_time – transmission time of current packet

- prev_time – transmission time of previous packet

Example: assume a flow with reservation r = 1 Mbps sending 1000 bit packets

)__( timeprevtimecrtrgthvirtualLen

100012001300

1000

1.2 ms

1000

1.3 ms

1000 length

1900

1.9 ms

1000

virtuallength

Page 51: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 51

Estimating Aggregate Reservation (Rest)

Use Dynamic Packet State (DPS) Ingress node: upon each packet departure computes the

virtual length and inserts it in the packet header Core node: Estimate Rest on each output link as

- where S(a, a+T) contains of all packets of all flows received during [a, a+T)

T

igthvirtualLen

R TaaSiest

),(

)(

Page 52: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 52

Aggregate Reservation Estimation: Discussion

The estimation algorithm is robust in presence of control message loss and duplication

- their effect is “forgotten” after one estimation interval

If no packet of a flow departs during a predefined interval (i.e., maximum inter-departure time), ingress node generates a dummy packet

Utilization <= 1 – f ,- where f = (max. inter-departure time) / (estimation int.)

- e.g.: max. inter-departure time = 5s; estimation int. = 30s utilization <= 0.83

Page 53: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 53

Data path- Per-flow classification

- Per-flow buffer

management

- Per-packet scheduling

Control path- Install and maintain

per flow state for

data and control paths

Core Router

Buffermanagement

Scheduler

Control State

Page 54: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 54

Data path- Per-flow classification

- Per-flow buffer

management

- Per-packet scheduling

Control path- Install and maintain

per flow state for

data and control paths

Core Router

Buffermanagement

Scheduler

Control State

no need to maintain consistency of per-flow state

Page 55: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 55

Motivations: what is the problem and why is it important? Existing solutions Solution: SCORE architecture and DPS technique Example: providing guaranteed services

- Eliminate per-flow state on data path

- Eliminate per-flow state on control pathImplementation and experimental results

Conclusions

Outline

Page 56: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 56

Implementation: State Encoding

Problem: Where to insert the state ? Possible solutions:

- between link layer and network layer headers

- as an IP option (IP option 23 allocated by IANA)

- find room in IP header

Page 57: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 57

Implementation: State Encoding

Current solution- 4 bits in DS field (belong to former TOS)

- 13 bits by reusing fragment offset

Encoding techniques- Take advantage of implicit dependencies between state

values

- Temporal multiplexing: use one field to encode two states, if these states do not need to be simultaneously presented in each packet

Page 58: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 58

Implementation

FreeBSD 2.2.6 Pentium II 400 MHz ZNYX network cards 10/100 Mbps Ethernet Fully implements control and data path functionalities Management and monitoring infrastructure

Page 59: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 59

Monitoring Infrastructure

Light weight mechanism that allows continuous monitoring at packet level

Implementation- Record each packet (28 bytes)

• IP header and port numbers

• arrival, departure or drop times

- Use raw IP to send this information to a monitoring site

Page 60: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 60

A Simple Experiment Three flows sharing a 10 Mbps link

- Flow 1: 1 Mbps reservation

- Flow 2: 3 Mbps reservation with ON/OFF traffic

- Flow 3: best-effort UDP sending at > 8 Mbps

aruba(ingress)

cozumel(core)

Monitoringmachine

Page 62: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 62

Aggregate Reservation Computation

0.5 Mbps reservation active during entire interval 0.5 Mbps reservation starting at 18 sec; ending at 39 sec

0

0.2

0.4

0.6

0.8

1

1.2

15 25 35 45Time (sec)

Rat

e (M

bp

s)

Aggregate

Rbound

R

acceptreservation(0.5 Mbps)

terminatereservation(0.5 Mbps)

Page 63: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 63

Conclusions Propose a network architecture (SCORE) and a technique

(DPS) that bridge longstanding gap between stateless and stateful solutions

Key ideas- Instead of core routers maintain per-flow state have packets carry this

state

- Use state to coordinate edge and core router actions

Reference Stateful Network

SCORE Network

Page 64: CS 268: Lecture 17 (Dynamic Packet State) Ion Stoica April 15, 2002

[email protected] 64

Conclusions

Develop first scalable solutions to provide: - Service guarantees

- Network support for congestion control

- Service differentiation

DPS compatible with Diffserv: can greatly enhances the functionality while requiring minimal changes