Buffer Management

Download Report

Transcript Buffer Management

CS 414 – Multimedia Systems Design
Lecture 28 –
Final Comments on DASH and
Client-Server Buffer Management
Klara Nahrstedt
Spring 2012
CS 414 - Spring 2012
Administrative


MP2 posted
MP2 Deadline – April 7, Saturday, 5pm.
CS 414 - Spring 2012
DASH AND INTERNET VIDEO
MOBILITY
CS 414 - Spring 2012
Covered Aspects of Multimedia
Image/Video
Capture
Audio/Video
Perception/
Playback
Audio/Video
Presentation
Playback
Image/Video Information
Representation
Transmission
Audio
Capture
Transmission
Compression
Processing
Audio Information
Representation
Media
Server
Storage
CS 414 - Spring 2012
A/V
Playback
DASH featuring Session
Mobility (Problem Description)
Problem: User runs DASH streaming session on laptop and decides to switch to
Another mobile device
Source: Muller et al, MMSys’11
CS 414 - Spring 2012
Composition of Media
Presentations (CMP)
Consider layer on top of MDP which
specifies initial user and device options
 Reasons:
 Size
of MPD expands very quickly (different camera
views/angles, subtitles, audio languages, …)
 Device pre-configuration (codec, resolution…)
 User pre-configuration due to her preferences
(camera angle, subtitle, …)
 Flexibility and compatibility with existing repository
formats
CS 414 - Spring 2012
CMP Protocol Sequence
(1) At Client Request CMP from
Server
(1) Once CMP received, check and
Configure CMP at client if needed
(3) Request for MDP that fulfills
Requirements
(4) Start standard DASH complaint
steps
Source: Muller et al, MMSys’11
CS 414 - Spring 2012
Session Mobility Protocol
(1) Initiate session transfer
(2) Digital Item Adaptation (DIA)
Starts and preserves current
state of Digital Item (segment)
(3) Transfer Context digital item
To selected device
(4) Download CMP
(5) Reconfigure device
(6) Continue with
DASH-compatible protocol
Source: Muller et al. MMSys 2011 CS 414 - Spring 2012
MULTIMEDIA BUFFERING
ISSUES
CS 414 - Spring 2012
Covered Aspects of Multimedia
Image/Video
Capture
Audio/Video
Perception/
Playback
Audio/Video
Presentation
Playback
Image/Video Information
Representation
Transmission
Audio
Capture
Transmission
Compression
Processing
Audio Information
Representation
Media
Server
Storage
CS 414 - Spring 2012
A/V
Playback
Motivation for Buffering
Buffers are temporary holding areas of
RAM that contain transferable data.
 In multimedia systems, transferable data
occur when

 Transmitting
multimedia from sender to
receiver over Internet
 Transferring multimedia from disk to RAM
 Transferring multimedia RAM to I/O Devices
CS 414 - Spring 2012
Layered Code in Multimedia Systems
RECEIVER
SENDER
Sampling/Encoding
Streaming Application
Decoding/Playout
Streaming Application
Real-time Transport
Protocol (RTP)
(Packetization)
Real-time Transport
Protocol (De-Packetization
UDP
UDP
IP
IP
Ethernet
Ethernet
CS 414 - Spring 2012
End-to-end Processing and Transmission of
Digital Media Signals
Sampling
A/D
ps(t)
encoder
e(t)
packetization
Analog
Media
signal
pr(t)
bs(t)
network
playout
d(t)
r(t)
Dec oder
Depacketization
br(t)
p(t) – amount of captured/playout bits its at time t; e(t), d(t) amount of encoded/decoded
bits at time t; b(t) - amount of clustered bits at time t
CS 414 - Spring 2012
Example: Sender and Receiver Curves for
transmission of CBR signal (digital speech with 64
kbps over a circuit-switched network)
buffering
bytes
ps(t)
br(t)
pr(t)
bs(t)
time
CS 414 - Spring 2012
Sender/Receiver Curves for Transmission of Voice
over Packet-switched network
bytes
ps(t)
pr(t)
bs(t)
r(t)
Late
loss
CS 414 - Spring 2012
Outline
Protocol Requirements on Buffer
Management
 Buffer Management

 Data
Copying
 Offset Management
 Scatter/Gather System

Buffering Strategies
 Minbuf
 Maxbuf
CS 414 - Spring 2012
Buffer Management




Buffers can be viewed as spatial representation
of time
Buffer plays very important role in smoothing
traffic
Network protocols buffer their service data units
(SDUs) and use data copying when going from
one protocol layer to another
Moving data using data copying is very
expensive
CS 414 - Spring 2012
Data Copying
RTP
Streaming
Service
Buffer for
RTP
Protocol Data Unit
User space
Copy data
Kernel
Transport
Service Entity
(UDP)
Buffer for
UDP Datagram
Copy data
Network
Service Entity
(IP)
Buffer for
IP Datagram
CS 414 - Spring 2012
Buffer Management
System at Receiver
Layered Code in Multimedia Systems
RECEIVER
SENDER
Sampling/Encoding
Streaming Application
Decoding/Playout
Streaming Application
Real-time Transport
Protocol (Packetization/
And Segmentation)
Real-time Transport
Protocol (De-Packetization
And Re-assembly)
UDP
UDP
Re-assembly
Segmentation
IP
IP
Segmentation
Reassembly
Ethernet
Ethernet
NETWORK
CS 414 - Spring 2012
Protocol Requirements on Buffer
Management and Segmentation
Protocol Requirements
Service Data Unit (SDU)
Example:
Application Data Unit – Video I frame
That comes out of encoder
SEGMENTATION
PCI
SDU1
PCI
Buffer Management:
Keep identification (PCI) to which
application data unit the segment
belongs
SDU2
CS 414 - Spring 2012
Example:
I frame gets split into two
RTP datagrams
Reassembly and Retransmission
Requirements on Buffer Management
SDU1
SDU2
REASSEMBLY
PCI
SDU1
PCI
SDU2
Buffer Management: support linking of memory to form one buffer
RETRANSMISSION
Buffer Management : logical copy of buffer must exist to store SDUs for
Possible retransmission
CS 414 - Spring 2012
Multi-cast and Multi-target
requirements on Buffer Management
Multicast
S
PCI -Group
T3
T1
SDUi
Buffer Management: Keep only
One buffer for all recipients
Use Multicast Group address (PCI-Group)
T2
Multi-Traget
PCI-T1
PCI-T2
T1
T3
T2
PCI-T3
CS 414 - Spring 2012
Buffer Management:
Keep one memory segment
Common to all buffers
SDUi
Buffer Management Techniques
Data
DATA COPYING
Buffer Management: Copy data and PCIs
between protocol layers
Problems:???
OFFSET MANAGMENT
PCI1
PCI2
3. PCI2 2. PCI1
Buffer Management: Assign as large buffer as
data + all headers of the protocols require
Problems:???
CS 414 - Spring 2012
PCI1
1. data
Data
Data
App
RTP
UDP
1. app
2. PCI1 added
by RTP
3. PCI2 added by
UDP
Buffer Management Techniques
(Scatter-Gather)
Data PTR1
DATA
Application
Buffer Space
PCI1
RTP Buffer
Space
PCI2
UDP Buffer
Kernel Space
PCI1 PTR2
PCI2 PTR3
Scatter/Gather
Table Structure
Buffer Management: Establish scatter/gather
Table structure across all protocol layers to keep
Track where payload (data) and control info (PCIs)
Are located
Problems: ???
CS 414 - Spring 2012
Comparison
Data Copying
Offset
Scatter/Gather
Memory BW
High
Low
Low
CPU BW
High
Low
Low
Memory Usage Optimal for
per Layer
individual
protocol layer
because exact
amount of
space will be
allocated
High for
application
protocol
because it
must allocate
space more
than it needs
Compromise,
segments are
sized
depending on
requirements
Are Protocol
NA
Requirements
without copying
satisfied?
No,
segmentation
needs copying
Mostly yes
(one copy and
segmentation
must be done
when data
leaves node)
CS 414 - Spring 2012
Buffering Strategies in ClientServer Systems
Read encoded
frames from
VOD Disk
Packetization
Protocol Stack Processing
VOD Server
network
VOD Client
playout
Decoder
CS 414 - Spring 2012
De-Packetization
Protocol Stack
Processing
VOD Retrieval Transmission and
Receiving
Sending
Playout Curves
Curve at VOD
Curve from
VOD server
bytes
Client
Retrieval curve
From disk
buffers
Playout Curve
At VOD Client
time
CS 414 - Spring 2012
Buffer Management Strategies
Clients need buffers for VOD (Video-onDemand) application to smooth out traffic
jitters
 Buffer management strategies balance
bits in transit (buffer size and bits in
channel)
 Fixed Strategy (non-adaptive) and
dynamic (adaptive)

CS 414 - Spring 2012
Buffer Management Strategies

Fixed buffer strategy
 Static
buffer allocation during multimedia call
setup phase
 Static buffer allocation does not change
during run-time

Dynamic buffer strategy
 Elastic
buffer allocation , i.e., allocate buffers
during multimedia call setup, but change them
during run-time
CS 414 - Spring 2012
Buffering Strategies at VOD
Client

Minbuf - minimum buffering strategy
 Minbuf
minimizes buffering requirements at
VOD client, but makes more demands on
network (throughput and delay guarantees)

Maxbuf – maximum buffering strategy
 Maxbuf
buffers more than one unit of
information and eases QoS guarantees
demands on network
 Buffering only up to a limit (Bufmax)
CS 414 - Spring 2012
Conclusion
Need buffering at VOD client side
 Some buffering needed also at VOD
Server side

 Can

use FIFO techniques
Reservation memory schemes are
possible
 Implemented

in system, called RK (CMU)
Will talk about VOD server in next
lectures
CS 414 - Spring 2012