cse 124 networked services fall 2009

28
CSE 124 Networked Services Fall 2009 B. S. Manoj, Ph.D http://cseweb.ucsd.edu/ classes/fa09/cse124 10/8/2009 1 CSE 124 Networked Services Fall 2009 slides are adapted from various sources/individuals including but n m the text books by Kurose and Ross. Use of these slides other than rpose for CSE 124, may require explicit permissions from the respec

Upload: nerea-walters

Post on 31-Dec-2015

18 views

Category:

Documents


0 download

DESCRIPTION

CSE 124 Networked Services Fall 2009. B. S. Manoj, Ph.D http://cseweb.ucsd.edu/classes/fa09/cse124. Some of these slides are adapted from various sources/individuals including but not limited to the slides from the text books by Kurose and Ross. Use of these slides other than for - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CSE 124  Networked Services Fall 2009

CSE 124 Networked Services

Fall 2009B. S. Manoj, Ph.D

http://cseweb.ucsd.edu/classes/fa09/cse124

10/8/2009 1CSE 124 Networked Services Fall 2009

Some of these slides are adapted from various sources/individuals including but not limited to the slides from the text books by Kurose and Ross. Use of these slides other than for pedagogical purpose for CSE 124, may require explicit permissions from the respective sources.

Page 2: CSE 124  Networked Services Fall 2009

Multimedia Networking Applications • Network applications can be broadly classified into

– Loss sensitive• Data traffic such as HTTP or FTP traffic• Delay tolerant

– Delay sensitive• Streamed stored audio/video• Streamed live audio/video• Interactive video• Loss tolerant

– Loss and delay sensitive• Time-sensitive stock quotes• Health sensor traffic

10/8/2009 2CSE 124 Networked Services Fall 2009

Page 3: CSE 124  Networked Services Fall 2009

Streaming Stored Audio/Video• Streaming

– The media transfer scheme where a part of the media file is played out while the remaining parts of the file are being received

– Popular services: stored video sharing servers such s YouTube, Yahoo Videos, CNN etc.

– Uni-directional media communication

• Main features– Stored media files that are pre-recorded and coded– Streaming over the Internet

• Streaming server pushes the content at a regular rate• Streaming client begins play back a few seconds after beginning reception• Two kinds of media players

– Web browser-based and Host based

– Continuous play out• Play out options are many: Fast Forward, Rewind, and Pause• Once play out begins, it should strive to maintain the original recorded timings• Key issue: getting the data over the network in time10/8/2009 3CSE 124 Networked Services Fall 2009

Page 4: CSE 124  Networked Services Fall 2009

Streaming Live Audio and Video• Media source generates multimedia content in real-

time– e.g., live video or audio transmission– Delay associated with content generation

• Limited play out options: Limited Rewind and Pause

• Uni-directional media communication

• More stringent delay constraints than stored media streaming

10/8/2009 4CSE 124 Networked Services Fall 2009

Page 5: CSE 124  Networked Services Fall 2009

Real-time Interactive Audio/Video• Mostly bi-directional media communication

• Each end-source generates media content in real-time

• High delay constraints due to interactive nature of communication

• End-to-end delay preferably < 150ms

• e.g, Voice over IP applications such as Skype, Google Talk, Yahoo Messenger, Microsoft Netmeeting

10/8/2009 5CSE 124 Networked Services Fall 2009

Page 6: CSE 124  Networked Services Fall 2009

Why multimedia services are challenging?

• Internet is designed for delay tolerant data communications– Best-effort traffic support only– Neither guarantee nor timeliness of data delivery

• During high load situations – the delay performance can be worse– High load can be at the server, network links, or the routers

• Main issues– Delay (latency or end-to-end delay)– Jitter (Delay jitter or Delay variation)– Packet loss

10/8/2009 6CSE 124 Networked Services Fall 2009

Page 7: CSE 124  Networked Services Fall 2009

Delay • Kinds of delays

– Source delay (content generation delay– End-to-end delay – Play out delay

• Source delay– Generating a media content takes certain amount of time

10/8/2009 7CSE 124 Networked Services Fall 2009

Analog voice (4KHz)

Digitization (8KHz, 8 bits per sample)

10101010000000….

8 KBytes per second

10101010000

160 Bytes packet will take about 160 B/8KB/s= 20ms120 B/8KB/s= 15ms

Page 8: CSE 124  Networked Services Fall 2009

Delay (contd)

• End-to-end delay – Due to the end-to-end network

• Contributed by– Processing time by the intermediate routers– Queuing delay at intermediate routers– Transmission delay due to the source and

intermediate routers– Propagation delay due to the links in the network

10/8/2009 8CSE 124 Networked Services Fall 2009

Page 9: CSE 124  Networked Services Fall 2009

Introduction 1-9

End-to-end delay: four sources• 1. Router processing:

– Receive– Check bit errors– Buffer– Determine output link

A

B

propagation

transmission

Routerprocessing queueing

2. Queueing Time waiting at

output link/buffer for transmission

Vary drastically depends on congestion level of router

Page 10: CSE 124  Networked Services Fall 2009

Introduction 1-10

End-to-end delay

3. Transmission delay:• R=link bandwidth (bps)• L=packet length (bits)• time to send bits into link

= L/R

4. Propagation delay:• d = length of physical link• s = propagation speed in

medium – copper: ~2x108 m/sec– Wireless: 3x 108 m/sec– Fiber: 3x 108 m/sec

• propagation delay = d/s

A

B

propagation

transmission

Routerprocessing queueing

Page 11: CSE 124  Networked Services Fall 2009

Introduction 1-11

Queueing delay (revisited)

• R=link bandwidth (bps)• L=packet length (bits)• a=average packet arrival

rate

traffic intensity = La/R

La/R ~ 0: average queueing delay small La/R -> 1: delays become large La/R > 1: more “work” arriving than can be serviced,

average delay infinite!

Page 12: CSE 124  Networked Services Fall 2009

End-to-end Delay

• Delay at a router/node

• End-to-end delay

10/8/2009 CSE 124 Networked Services Fall 2009 12

proptransqueueprocrouter ddddd

• dproc = processing delay– typically a few microsecs or

less• dqueue = queuing delay

– depends on congestion• dtrans = transmission delay

– = L/R, significant for low-speed links

• dprop = propagation delay– a few microsecs to hundreds

of msecs– N = number of routers/nodes in

the network– di = delay at router/node i

N

iid

1

Page 13: CSE 124  Networked Services Fall 2009

Playout delay• The delay added/caused by the receiver-side media

player

• A certain amount of delay in playing out may improve the playout performance

• Challenge is to get the required OS resources to play when desired– High priority for playout processes is essential

• Two types– Fixed playout delay– Adaptive playout delay10/8/2009 13CSE 124 Networked Services Fall 2009

Page 14: CSE 124  Networked Services Fall 2009

Jitter• The shared network resources such as links and routers

– Results in high variability in end-to-end delay– Sometimes packets can be even out-of-ordered

• Jitter cannot be easily removed– Because the network is best-effort– Its impact can be lessened– Receiver playout management

t

1 2

1t+d

t+20ms

t+20ms+2d

2

3t+40ms

3t+40ms+d

10/8/2009 14CSE 124 Networked Services Fall 2009

Page 15: CSE 124  Networked Services Fall 2009

Handling Jitter• The impacts of Jitter can be managed together by

– Sequence numbering– Time stamps– Receiver playout delay

• Media source adds sequence numbers to every media packet– Sequence number increments with every packet– Usually unique for a certain duration of the session

• Time stamps include the time instance at which the packets are generated

• Sequence numbers and time stamps help– differentiate packet losses from silence periods10/8/2009 15CSE 124 Networked Services Fall 2009

Page 16: CSE 124  Networked Services Fall 2009

t

1 2

1t+d

t+20ms

t+20ms+d

2

3t+40ms

3

4 5 6

4 5 6

t+80ms t+100ms t+120ms

t+40ms+d t+80ms+d t+100ms+d t+120ms+d

t

1 2

1t+d

t+20ms

t+20ms+d

2

3t+40ms

3

4 5 6

6

t+60ms t+80ms t+100ms

t+40ms+d t+100ms+d

t

1 2

1t+d

t+20ms

t+20ms+d

2

3t+40ms

3

4 5 6

4 5 6

t+60ms t+80ms t+100ms

t+40ms+d t+60ms+d t+80ms+d t+100ms+d

PacketLoss

Talk spurt

10/8/2009 16CSE 124 Networked Services Fall 2009

Page 17: CSE 124  Networked Services Fall 2009

Receiver Playout delay• Delay added by receiver media player for every packet

• Two approaches– Fixed playout delay– Adaptive playout delay

• Fixed playout delay– Receiver fixes the playout delay for all packets– Simple to implement– e.g., media receiver plays out every packet exactly q units of

time after receiving it • If packet is received at time t, it is played at time t+q

– Determining a good value for q is a challenge10/8/2009 17CSE 124 Networked Services Fall 2009

Page 18: CSE 124  Networked Services Fall 2009

CSE 124 Networked Services Fall 2009

Fixed Playout Delay

packets

tim e

packetsgenerated

packetsreceived

loss

r

p p '

playout schedulep' - r

playout schedulep - r

• sender generates packets every 20 msec during talk spurt.• first packet received at time r• first playout schedule: begins at p• second playout schedule: begins at p’

10/8/2009

Page 19: CSE 124  Networked Services Fall 2009

Determining Fixed Playout Delay

• There are no strict rules for the choice of fixed playout delay– The delay is sufficient to handle the Jitter

– One good estimate is the play out time can be equal to Mean Delay + Mean Jitter

– Therefore, p = (Mean Delay + Mean Jitter) – r

150 ms 400 ms0 ms

10/8/2009 19CSE 124 Networked Services Fall 2009

Page 20: CSE 124  Networked Services Fall 2009

Adaptive Playout Delay• In a dynamic network, Jitter can vary highly

– Use of fixed playout delay can result in high packet loss or non optimal play out delay

– Adaptive Playout delay is preferred in such dynamic situations

– Adaptive playout delay, dynamically modifies the playout delay

– Playout delay is modified based on the delay and jitter observations

– Playout delay is estimated for every packet, however, modified only when the talk spurt begins

• Objective: Minimize playout delay, keeping late loss rate low10/8/2009 20CSE 124 Networked Services Fall 2009

Page 21: CSE 124  Networked Services Fall 2009

Estimating Adaptive Playout Delay

packetith receivingafter delay network average of estimated

acketpith for delay network tr

receiverat played is ipacket timethep

receiverby received is ipacket timether

packetith theof timestampt

i

ii

i

i

i

dynamic estimate of average delay at receiver:

)()1( 1 iiii trudud

where u is a fixed constant (e.g., u = .01).

• One Approach to adaptive playout delay adjustment:– estimate network delay, adjust playout delay at beginning of each talk

spurt. – silent periods compressed and elongated.– chunks still played out every 20 msec during talk spurt.

10/8/2009 21CSE 124 Networked Services Fall 2009

Page 22: CSE 124  Networked Services Fall 2009

Estimating Adaptive playout delay also useful to estimate average deviation of delay, vi :

||)1( 1 iiiii dtruvuv

estimates di , vi calculated for every received packet (but used only at start of talk spurt

for first packet in talk spurt, playout time is:

iiii Kvdtp where K is positive constant

remaining packets in talkspurt are played out periodically at time

iijj Kvdtp

10/8/2009 22CSE 124 Networked Services Fall 2009

Page 23: CSE 124  Networked Services Fall 2009

• TCP-like transport protocols are not suitable for multimedia traffic– They are connection oriented

• high overhead– They offer reliable delivery

• high delay due to potential retransmissions• Larger playout delay: smooth TCP delivery rate• HTTP/TCP passes more easily through firewalls• Transmission rate fluctuates due to TCP congestion control

• UDP-like light connection less protocols are preferred– Low end-to-end delay– short playout delay (2-5 seconds) to remove network jitter

• Due to administrative reasons, TCP still dominates the multimedia video/audio transport

• UDP is prominent for VoIP applications

Transport layer choice for multi-media applications

10/8/2009 23CSE 124 Networked Services Fall 2009

Page 24: CSE 124  Networked Services Fall 2009

Packet loss

• Packet loss is unavoidable– Recovery from packet loss is an important

objective– Lossy recovery is sufficient for multimedia

• Two popular approaches– Forward Error Correction– Packet Interleaving

10/8/2009 CSE 124 Networked Services Fall 2009 24

Page 25: CSE 124  Networked Services Fall 2009

Forward Error CorrectionApproach: Packet Redundancy • for every group of N chunks

create redundant chunk by exclusive OR-ing N original chunks

• send out N+1 chunks, increasing bandwidth by factor 1/N.

• can reconstruct original N chunks if at most one lost chunk from N+1 chunks

• playout delay: enough time to receive all N+1 packets

• tradeoff: – increase N, less

bandwidth waste– increase N, longer

playout delay– increase N, higher

probability that 2 or more chunks will be lost

Page 26: CSE 124  Networked Services Fall 2009

FEC Approach: Stream redundancy “piggyback lower quality stream” send lower resolutionaudio stream as redundant information e.g., nominal stream PCM at 64 kbpsand redundant streamGSM at 13 kbps.

whenever there is non-consecutive loss, receiver can conceal the loss. can also append (n-1)st and (n-2)nd low-bit ratechunk

Page 27: CSE 124  Networked Services Fall 2009

Packet Interleaving method

Interleaving• chunks divided into smaller units• for example, four 5 msec units per

chunk• packet contains small units from

different chunks

• if packet lost, still have most of every chunk

• no redundancy overhead, but increases playout delay

Page 28: CSE 124  Networked Services Fall 2009

Week-2-Homework

• Reading assignments – File Transfer protocol

• End-of-chapter Problems P10 and P11 from Chapter 7 of Kurose and Ross (page 676)

– Will be placed at the course website

10/8/2009 28CSE 124 Networked Services Fall 2009