12
1 15-744: Computer Networking L-16 QoS and Video Streaming QoS and Video Streaming Assigned reading: Video control plane Bird’s Nest: Sections 1-2 Optional reading: • Coolstream Live Video Streaming with Dynamic Application End-points 2 Overview • QoS • Motivation Integrated services Adaptive applications Differentiated services Video streaming • Background Olympics study Video control plane 3 4 Motivation Internet currently provides one single class of “best-effort” service No assurances about delivery Existing applications are elastic Tolerate delays and losses Can adapt to congestion Future “real-time” applications may be inelastic

Video control plane 15-744: Computer Networking • Bird’s ...prs/15-744-F12/lectures/16-QoS.pdf · 15-744: Computer Networking ... • Motivation • Integrated services • Adaptive

Embed Size (px)

Citation preview

1

15-744: Computer Networking

L-16 QoS and Video Streaming

QoS and Video Streaming

• Assigned reading: • Video control plane• Bird’s Nest: Sections 1-2

• Optional reading: • Coolstream• Live Video Streaming with Dynamic Application

End-points

2

Overview

• QoS• Motivation• Integrated services• Adaptive applications• Differentiated services

• Video streaming• Background• Olympics study• Video control plane

3 4

Motivation

• Internet currently provides one single class of “best-effort” service• No assurances about delivery

• Existing applications are elastic• Tolerate delays and losses• Can adapt to congestion

• Future “real-time” applications may be inelastic

2

5

Inelastic Applications

• Continuous media applications• Lower and upper limit on acceptable performance.• BW below which video and audio are not intelligible• Internet telephones, teleconferencing with high delay

(200 - 300ms) impair human interaction

• Hard real-time applications• Require hard limits on performance• E.g. control applications

6

Why a New Service Model?

• What is the basic objective of network design?• Maximize total bandwidth? Minimize latency?• Maximize user satisfaction – the total utility

given to users• What does utility vs. bandwidth look like?

• Must be non-decreasing function • Shape depends on application

7

Utility Curve Shapes

Stay to the right and youare fine for all curves

BW

U Elastic

BW

U Hard real-time

BW

U Delay-adaptive

8

Admission Control

• If U(bandwidth) is concave elastic applications

• Incremental utility is decreasing with increasing bandwidth

• Is always advantageous to have more flows with lower bandwidth

• No need of admission control;This is why the Internet works!

BW

U Elastic

3

9

Utility Curves – Inelastic traffic

BW

U Hard real-time

BW

U Delay-adaptive

Does equal allocation of bandwidth maximize total utility?

10

Admission Control

• If U is convex inelastic applications• U(number of flows) is no longer

monotonically increasing• Need admission control to

maximize total utility• Admission control

deciding when the addition of new people would result in reduction of utility• Basically avoids overload

BW

U Delay-adaptive

Overview

• QoS• Motivation• Integrated services• Adaptive applications• Differentiated services

• Video streaming• Background• Olympics study• Video control plane

11 12

Components of Integrated Services

1. Type of commitmentWhat does the network promise?

2. Packet schedulingHow does the network meet promises?

3. Service interfaceHow does the application describe what it wants?

4. Establishing the guaranteeHow is the promise communicated to/from the networkHow is admission of new applications controlled?

4

QoS Framework

G

H

F

E

CB

J

I

H

AdmissionControl

A

D

TrafficEnforcement

PacketScheduling

14

Type of Commitments• Guaranteed service

• For intolerant and rigid applications• Fixed guarantee, network meets commitment as long

as clients send at match traffic agreement

• Predicted service• For tolerant and adaptive applications• Two components

• If conditions do not change, commit to current service• If conditions change attempt to deliver consistent performance

• Datagram/best effort service

15

Components of Integrated Services

1. Type of commitmentWhat does the network promise?

2. Packet schedulingHow does the network meet promises?

3. Service interfaceHow does the application describe what it wants?

4. Establishing the guaranteeHow is the promise communicated to/from the networkHow is admission of new applications controlled?

16

Scheduling for Guaranteed Traffic

• Use token bucket filter to characterize traffic• Described by rate r and bucket depth b• Can also be used to do traffic enforcement by

reshaping the traffic at the network ingress• Use WFQ at the routers• Parekh’s bound for

Worst case queuing delay = b/r

5

17

Token Bucket Filter

Operation:• If bucket fills, tokens are

discarded• Sending a packet of size P

uses P tokens• If bucket has P tokens,

packet sent at max rate, else must wait for tokens to accumulate

Tokens enter bucket at rate r

Bucket depth b: capacity of bucket

18

Token Bucket Operation

Tokens

Packet

Overflow

Tokens Tokens

Packet

Enough tokens packet goes through,tokens removed

Not enough tokens wait for tokens to accumulate

19

Token Bucket Characteristics

• On the long run, rate is limited to r• On the short run, a burst of size b can be

sent• Amount of traffic entering at interval T is

bounded by:• Traffic = b + r*T

• Information useful to admission algorithm

20

Token Bucket Specs

BW

Time

1

2

1 2 3

Flow A

Flow BFlow A: r = 1 MBps, B=1 byte

Flow B: r = 1 MBps, B=1MB

6

21

DiffServ

• Analogy:• Airline service, first class, coach, various

restrictions on coach as a function of payment• Best-effort expected to make up bulk of

traffic, but revenue from first class important to economic base (will pay for more plentiful bandwidth overall)

• Not motivated by real-time! Motivated by economics and assurances

22

Basic Architecture• Agreements/service provided within a domain

• Service Level Agreement (SLA) with ISP• Edge routers do traffic conditioning

• Perform per aggregate shaping and policing• Mark packets with a small number of bits; each bit

encoding represents a class or subclass• Core routers

• Process packets based on packet marking and defined per hop behavior: default, expedited forwarding, and assured forwarding

• More scalable than IntServ• No per flow state or signaling

23

Edge Router Input Functionality

Packetclassifier

TrafficConditioner 1

TrafficConditioner N

Forwardingengine

Arrivingpacket

Best effort

classify packets based on packet header

24

Traffic Conditioning

Wait fortoken

Set EF bitPacketinput

Packetoutput

Test iftoken

Set AF “in” bit

token

No token

Packetinput

Packetoutput

Drop on overflow

7

25

Comparison

Service

Service Scope

Complexity

Scalability

• Connectivity• No isolation• No guarantees

• End-to-end

• No set-up

• Highly scalable• (nodes maintain

only routing state)

Best-Effort

• Per aggregation isolation

• Per aggregation guarantee

• Domain

• Long term setup

• Scalable (edge routers maintains per aggregate state; core routers per class state)

Diffserv

• Per flow isolation• Per flow guarantee

• End-to-end

• Per flow setup

• Not scalable (each router maintains per flow state)

Intserv

Overview

• QoS• Motivation• Integrated services• Adaptive applications• Differentiated services

• Video streaming• Background• Olympics study• Video control plane

26

Internet Video Today

• DVD transfer• BitTorrent P2P lecture

• Client-server streaming (“on demand”)• Hulu, Netflix, ..

• Synchronized video (“live”)• Sports events, IPTV, …

• Interactive video conferencing• Skype, …• Latency really matters

27 28

Client-Server Streaming:Adaptation Quality to Link

?

California New York

Long Time Scale

Short Time ScaleContent Negotiation

Server Selection

Adaptive Media

8

29

Problems Adapting to Network State

• TCP hides network state• New applications may not use TCP

• Often do not adapt to congestion

Need system that helps applications learn and adapt to congestion

f1f1

Server Client

?Internet

30

Feedback about Network State

• Monitoring successes and losses• Application hints• Probing system

• Notification API (application hints)• Application calls cm_update(nsent, nrecd,

congestion indicator, rtt)

Long History of Research in Video

• Early application Video Conferencing Tool• VIC – used the SIP protocol

• Motivated new TCP friendly congestion ctl• Motivated multicast research• Adaptive (multi-layer) video streaming• Motivated lots of QoS research• Video delivery leveraging peer-to-peer

• How much of this is currently in use?31

Some Example Systems

• IPTV: delivery of TV using IP technology• Multicast and R-UDP over private network• QoS limited to small number of flow class

• Video playback over the Internet• Uses playback buffers to avoid stalls• Tends to burst chunks of data using TCP• Rate adaptation is emerging technology

• Video conferencing• High quality over VPNs or dedicated lines• Best effort systems such as Skype

32

9

Overview

• QoS• Motivation• Integrated services• Adaptive applications• Differentiated services

• Video streaming• Background• Olympics study (slides Yixin)• Video control plane (based on slides authors)

33

Video Distribution Architecture

34

Architecture Overview

• Multiple layers of CDN nodes for scalability• Run the Adobe Flash Media Software (FMS)• Can run in original (top) or edge mode (other)

• FMS provide streaming capability• Pause, seek, etc. - similar to DVD players• Alternative is HTTP download (next)

• Operations Support Systems control load balancing, billing, …

35

Video Ecosystem: Data-Plane

Video Source

Encoders & Video Servers

CMS and Hosting

Content Delivery Networks (CDNs)

ISP & Home Net

Screen

Video Player

10

Video Quality Matters [Sigcomm’11]

Quality has substantial impact on viewer engagement Need to ensure uninterrupted streaming at high bitrates

Buffering ratio is most critical across video traffic typesHighest impact for live: 1% of buffering reduced play time by 3min1% increase in buffering can lead to more than 60% loss in audience over one month

Our Argument

CDN performance varies widely in time, geography, and ISPs

Opportunity for significantly improving video Quality by selecting best CDN (and bitrate) for each viewer

Hence, we argue for a logically centralized control plane to dynamically select CDN and bitrate

Assumptions:• Content is encoded at multiple bitrates• Content is delivered by multiple CDNs

How do We Collect Data?

Streaming ModuleStreaming Module

UI ControllerUI Controller

Content ManagerContent Manager

Messaging & SerializationMessaging & Serialization

Tobackend

HTTPS

Automatic MonitoringAutomatic Monitoring

Player InsightPlayer Insight

Play

er A

pplic

atio

n

Automatic and continuous monitoring of video playerFlash: NetStream, VideoElementSilverlight: MediaElement, SmoothStreamMediaElementiOS: MPMoviePlayerElement

CDNs Vary in Performance over Geographies and Time

There is no single best CDN across geographies, network, and time

25%

50%

25%

CDN 1

CDN 2

CDN 3

• Metric: buffering ratio• One month aggregated data-

set• Multiple Flash (RTMP) customers• Three major CDNs

• 31,744 DMA-ASN-hour with > 100 streams from each CDN• DMA: Designated Market Area

• Percentage of DMA-ASN-hour partitions a CDN has lowest buffering ratio

11

Washington DC (Hagerstown): ASN-CXA-ALL

10% 20% 100%30% 40% 50% 60% 70% 80% 90%

Washington, DC viewer experience differed greatly…

Comcast viewers got the best streams from CDN 1 51% of the time and only 9% from CDN 2

Washington DC (Hagerstown): VZGNI-TRANSIT (19262)

Verizon users got the best streams from CDN 1 only 17% of the time and 77% from CDN 2

There is no single best CDN in the same geographic region or over time

CDN Streaming Failures Are Common Events

% of stream failures: % of streams that failed to startThree months dataset (May-July, 2011) for a premium customer using Flash

CDN (relative) performance varies greatly over time

Possible Actions to Improve Quality

Switch the bitrate↓ Buffering, high frame drops, high start time, …↑ High available bandwidth, …

Switch the CDN↔ Connection error, missing content, buffering on low bitrate, ...

When to perform switching/selection?Start time selection onlyStart time selection & midstream switching

Video Control Plane Architecture

Coordinator implementing a global optimization algorithm that dynamically select CDN & bitrate for each client based on

Individual clientAggregate statisticsContent owner policies

(CDN/ISP info)

Content owners (CMS & Origin)

CDN 1

CDN 2

CDN 3Clients

Coordinator

Con

tinuo

us m

easu

rem

ents

Bus

ines

s Pol

icie

s

control

12

Example: Local vs. Global Optimization

CDN1 DMA

ASN

DMA

ASN

DMA

ASN

CDN2

CDN3

0

20

40

60

80

100

0 5000 10000 15000 20000Ban

dwid

th F

luct

uatio

n (%

)

Concurrent Viewers

0

10

20

30

40

0 5000 10000 15000 20000 25000 30000 35000Ban

dwid

th F

luct

uatio

n (%

)

Concurrent Viewers

ASN/DMA saturated on all CDNs Don’t switch CDN; cap bitrates, instead

What is Next?

• Three lectures on wireless next week

• Three “Choice” lectures:• Datacenter networks• Sensor Networks• Energy efficient wireless

46

Next Lecture: Data Center Networks

• Lecture starts at 3:30• Readings

• Portland• Sections 1, 2, and 4 of Incast• Sections 1-2 of VL2

• Optional• DCTCP

51