280 likes | 404 Views
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 : Check your email boxes for leasing form (from Rick Van Hook and/or Paula Welch)
E N D
CS 414 – Multimedia Systems DesignLecture 25 – Media Server (Part 1) Klara Nahrstedt Spring 2011 CS 414 - Spring 2011
Administrative • MP2 Deadline – Sunday, April 3 midnight • Pick up procedure for the mobile G2 phones : • Check your email boxes for leasing form (from Rick Van Hook and/or Paula Welch) • Fill out the leasing form • Go to office 1330 SC • Bring your ID • Bring a photocopy of your Icard on a 8 ½” x 11” sheet of paper • Bring the filled leasing form CS 414 - 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
Outline • Buffer Management Strategies for Multimedia Systems • Introduction to Media Servers • Disk Layout • Disk/Storage Management • Multimedia Data Placement Strategies on Disk CS 414 - Spring 2011
Buffering Strategies in Client-Server Systems Read encoded frames from VOD Disk Packetization Protocol Stack Processing network VOD Server VOD Client playout Decoder De-Packetization Protocol Stack Processing CS 414 - Spring 2011
Client/Server Video-on-Demand System CS 414 - 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 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 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
Client Buffer Constraints(Received amount of data Cr(t) should always be between ZOi (t) and ZOi (t) + Bufmax) CS 414 - 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
Implication of Maxbuf Strategy • Delivery schedule of VOD server and network may cause that Bufmaxbits 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
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
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
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
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
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
Servers Classification • Media Servers • Push Servers – file servers with streaming model • Servers push data towards users • Traditional File Servers • Pull Servers - FTP servers • Users 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
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 Space • HDTV quality: 1280x720 pixels/frame; 24 bits/pixel -> 81 Mbytes per second • NTCS quality: 640x480 pixels/frame; 24 bits/pixel ->27MBytes per seconds CS 414 - Spring 2011
VOD Retrieval Transmission and Playout Curves Receiving Curve at VOD Client Sending Curve from VOD server Retrieval curve From disk bytes buffers Playout Curve At VOD Client time CS 414 - 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
Support for Continuous Media • Proper management of multimedia disk storage • Optimal placement of data blocks on disk • Usage of multiple disks • Role of tertiary storage • Admission control • Special disk scheduling algorithms and sufficient buffers to avoid jitter CS 414 - Spring 2011
Media Server Architecture Delivered data Incoming request Network Attachment Content Directory Memory Management File System Storage management Disk controller Storage device CS 414 - Spring 2011
Disk Layout Zoned Disk (ZBR – Zone Bit Recording) Traditional Random Access Disk Layout Track Sector Advantage: Sector size same Rotation speed constant; efficient Usage of space Advantage: Easy mapping of location Information to head movement and disk rotation Problem: loss of storage space CS 414 - 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
Storage Management • Storage access time to read/write disk block is determined by 3 components • Seek 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
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
Placement of MM Data Blocks on Single Disk CS 414 - 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