cs 414 - spring 2011 cs 414 – multimedia systems design lecture 25 – media server (part 1) klara...

28
CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Upload: carol-higgins

Post on 02-Jan-2016

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

CS 414 - Spring 2011

CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1)

Klara Nahrstedt

Spring 2011

Page 2: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Administrative MP2 Deadline – Sunday, April 3 midnight Pick up procedure for the mobile G2

phones :1. Check your email boxes for leasing form

(from Rick Van Hook and/or Paula Welch)

2. Fill out the leasing form

3. Go to office 1330 SC 1. Bring your ID

2. Bring a photocopy of your Icard on a 8 ½” x 11” sheet of paper

3. Bring the filled leasing formCS 414 - Spring 2011

Page 3: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Administrative G2 phones can be picked up starting today,

March 30 you should all have the leasing form in your email

boxes today, March 30 !!!

G2 phones return policy must be returned by May 13 (or earlier) to Paula

Welch - Office 1330 SC Bring with you the copy of the leasing form!!!

Check the phones if they work. If any problem arises, please, return the phone and get a

replacement (try the phones as soon as possible since there are only limited number of replacement phones)

CS 414 - Spring 2011

Page 4: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Outline

Buffer Management Strategies for Multimedia Systems

Introduction to Media ServersDisk LayoutDisk/Storage Management

Multimedia Data Placement Strategies on Disk

CS 414 - Spring 2011

Page 5: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Buffering Strategies in Client-Server Systems

CS 414 - Spring 2011

Read encoded frames from VOD Disk

PacketizationProtocol Stack Processing

network

De-PacketizationProtocol Stack Processing

Decoderplayout

VOD Server

VOD Client

Page 6: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Client/Server Video-on-Demand System

CS 414 - Spring 2011

Page 7: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

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 strategyMaxbuf buffers more than one unit of information

and eases QoS guarantees demands on networkBuffering only up to a limit (Bufmax)

CS 414 - Spring 2011

Page 8: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Buffering Model ZOi(t) – amount of bits in multimedia object

(e.g., Video frame) Oi displayed at time t

Cr(t) – amount of bits received at receiver at time t

Two buffer states in each buffering strategy: Starvation if Cr(t) ≤ ZOi(t)

If Cr(t) > ZOi(t), no starvation at VOD client

Overflow if Cr(t) ≥ ZOi(t) + Bufmax

CS 414 - Spring 2011

Page 9: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Client Buffer Constraints(Received amount of data Cr(t) should always be between ZOi (t) and ZOi (t) + Bufmax)

CS 414 - Spring 2011

Page 10: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Implications of Minbuf Strategy With minbuf strategy – delivery time of a unit of

information is the display time of previous unit Minimum Throughput (Th) in bits per time unit

required is

Delivery time instant of the first unit before start of display:

CS 414 - Spring 2011

1

minmin

ii

Oibuf

tt

ZTh

bufOi

x Th

Zt

minmin

Page 11: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Implication of Maxbuf Strategy Delivery schedule of VOD server and network

may cause that Bufmax bits will be delivered every K seconds, where K = Bufmax/Th, Th – throughput of network

Minimum Throughput required ∑ZOi – total size in bits of all objects that will be

presented in stream:

CS 414 - Spring 2011

DurationDisplayStream

BufZTh

n

iOi

buf

__1

maxmaxmin

Page 12: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Standard Video Buffering Video delivered over “deterministic” channel (satellite, cable,

digital TV broadcasting) simple Small buffer (minbuf technique)

Data arrives to the media player with deterministic delay and rate and infrequent data drops

Video delivered over IP networks problematic Big buffers (maxbuf technique)

No guarantees in IP networks Streaming servers manage simple buffering

Data sent as quickly as possible; when buffer full, (reached predefined threshold), video playback starts and server continues to send data

CS 414 – Spring 2011

Page 13: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Implementation Issues Buffers for Uncompressed Periodic Streams

Use circular buffers as prefetch buffers with maxbuf strategy

Buffers for compresses periodic streams Use circular buffers, but carefully consider the size of buffer

unit (depending on MPJEG or MPEG) with maxbuf strategy For MPEG may consider dynamic buffer allocation

Buffers for control information Use priority queues or FIFO

Buffers for Non-RT data Use maxbuf strategy with static buffer allocation

CS 414 - Spring 2011

Page 14: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Implementation Issues Dual-Threshold Buffering (in Flash Media

Server) Buffer has two thresholds:

When buffer filled with data up to first threshold, start playback

After that continue buffering until second, higher threshold

Advantage: assures fast start, and at the same time provides fairly high resilience to bandwidth fluctuation

CS 414 - Spring 2011

Page 15: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Memory Management Virtual memory versus real memory paradigm In VM – paging introduces unpredictable delays Multimedia timing requirements suggest that no paging

is desired, however it might be difficult to do from user space

Multimedia applications may want to pin pages into memory which include their time-sensitive code

On-Chip Caching is desired Intel Pentium Processor with MMX technology (SIMD Instruction Set) has

on-chip cache of size 32KB for video processing only

CS 414 - Spring 2011

Page 16: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Memory Reservation Concept Possible

Done in hard real-time applications Done in some multimedia applications – pin multimedia

applications Be careful when you pin only the application since

if other services are paged, the application will wait anyway

Possible architecture Memory broker and memory controller Memory broker pins a certain size of memory – global

reserve – shared among RT processes

CS 414 - Spring 2011

Page 17: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Servers Classification Media Servers

Push Servers – file servers with streaming model Servers push data towards users

Traditional File ServersPull Servers - FTP serversUsers pull data in one block at a time by repeatedly

calling read to get one block after another RPC (Remote Procedure Calls)

CS 414 - Spring 2011

Page 18: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Media Server Requirements Real-time storage and retrieval

Media quanta must be presented using the same timing sequence with which they were captured

High-Data Transfer Rate and Large Storage SpaceHDTV quality: 1280x720 pixels/frame; 24 bits/pixel -

> 81 Mbytes per secondNTCS quality: 640x480 pixels/frame; 24 bits/pixel -

>27MBytes per seconds

CS 414 - Spring 2011

Page 19: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

VOD Retrieval Transmission and Playout Curves

CS 414 - Spring 2011

time

bytes Retrieval curveFrom disk

SendingCurve fromVOD server

ReceivingCurve at VOD Client

Playout CurveAt VOD Client

buffers

Page 20: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Playback Single Stream Playback

Possible approach – buffer the whole stream Problem:??

Possible approach – prefetch just short video part Problem:

Prevent starvation Minimize buffer space requirement Minimize initiation latency

Multiple Streams Playback Possible approach – dedicate a disk to each stream

Problem: ??

Possible approach – multiple streams per disk Problems: ??

CS 414 - Spring 2011

Page 21: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Support for Continuous Media

Proper management of multimedia disk storageOptimal placement of data blocks on diskUsage of multiple disksRole of tertiary storage

Admission control Special disk scheduling algorithms and

sufficient buffers to avoid jitterCS 414 - Spring 2011

Page 22: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Media Server Architecture

CS 414 - Spring 2011

Storage device

Disk controller

Storage management

File System

Memory Management

Content Directory

Network Attachment

Incoming requestDelivered data

Page 23: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Disk Layout

CS 414 - Spring 2011

Track

Sector

Zoned Disk (ZBR – ZoneBit Recording) Traditional Random Access

Disk Layout

Advantage: Easy mapping of location Information to head movement and disk rotation Problem: loss of storage space

Advantage: Sector size sameRotation speed constant; efficient Usage of space

Page 24: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

ZBR Disk Design Stores more sectors per track on outer tracks than on inner tracks Is called also Zone Constant Angular Velocity (ZCAV) Place most popular movies in disk outer zones and aggregate

“hot” movies together to take advantage of high bandwidth in outer zones

Multi-zone disks ZBR’s drive controller varies rate at which it reads and writes – faster

on outer tracks Products that use ZBR

HD DVD-RW Most hard drives since 1990s

CS 414 - Spring 2011

Page 25: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Storage Management Storage access time to read/write disk

block is determined by 3 componentsSeek Time

Time required for the movement of read/write head

Rotational Time (Latency Time) Time during which transfer cannot proceed until the right

block or sector rotates under read/write head

Data Transfer Time Time needed for data to copy from disk into main memory

CS 414 - Spring 2011

Page 26: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Impact of Access Time Metrics

If data blocks are arbitrarily placed If requests are served on FCFC basis Then effort for locating data place may cost

time period in order of magnitude 10ms This performance degrades disk efficiency Need techniques to reduce seek,

rotation and transmission times !!!

CS 414 - Spring 2011

Page 27: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Placement of MM Data Blocks on Single Disk

CS 414 - Spring 2011

Continuous Placement Scattered Placement

Simple to implement, but subject to fragmentation

Avoids fragmentation

Enormous copying overhead during insert/delete to maintain continuity

Avoid copying overhead

When reading file, only one seek required to position the disk head at the start of data

When reading file, seek operation incurs for each block , hence intrafile seek

Page 28: CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011

Conclusion

Disk Layout and Number of disks play important role for media servers

Data block placement and file placement are crucial for real-time retrieval on media servers

CS 414 - Spring 2011