CS 414 Multimedia Systems Design Lecture 32 Media

  • Slides: 27
Download presentation
CS 414 – Multimedia Systems Design Lecture 32 – Media Server (Part 1) Klara

CS 414 – Multimedia Systems Design Lecture 32 – Media Server (Part 1) Klara Nahrstedt Spring 2014 CS 414 - Spring 2014

Administrative n MP 2 demonstrations – Monday, April 14, 5 -7 pm CS 414

Administrative n MP 2 demonstrations – Monday, April 14, 5 -7 pm CS 414 - Spring 2014

Covered Aspects of Multimedia Image/Video Capture Audio/Video Perception/ Playback Audio/Video Presentation Playback Image/Video Information

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 2014 A/V Playback

Outline Media Server Requirements n Media Server Layered Architecture n CS 414 - Spring

Outline Media Server Requirements n Media Server Layered Architecture n CS 414 - Spring 2014

Client/Server Video-on-Demand System CS 414 - Spring 2014

Client/Server Video-on-Demand System CS 414 - Spring 2014

Video-on-Demand Systems must be designed with goals: Avoid starvation n Minimize buffer space requirement

Video-on-Demand Systems must be designed with goals: Avoid starvation n Minimize buffer space requirement n Minimize initiation latency (video startup time) n Optimize cost n CS 414 - Spring 2014

Media Server Requirements n Real-time storage and retrieval ¨ Media quanta must be presented

Media Server Requirements n Real-time storage and retrieval ¨ Media quanta must be presented using the same timing sequence with which they were captured n High-Data Transfer Rate and Large Storage Space ¨ HDTV quality: 1280 x 720 pixels/frame; 24 bits/pixel -> 81 Mbytes per second ¨ NTCS quality: 640 x 480 pixels/frame; 24 bits/pixel ->27 MBytes per seconds CS 414 - Spring 2014

You. Tube Video Server n http: //tech. fortune. cnn. com/2010/05/17/yo utube-at-5 -years-old-2 -billion-served-perday/ ¨

You. Tube Video Server n http: //tech. fortune. cnn. com/2010/05/17/yo utube-at-5 -years-old-2 -billion-served-perday/ ¨ May 2010, 2 Billion videos served per day ¨ More than 24 hours of video uploaded every minute ¨ Videos usually less than 10 minutes long CS 414 - Spring 2014

You. Tube Video Server (2011) n n n Over 4 B videos are viewed

You. Tube Video Server (2011) n n n Over 4 B videos are viewed a day 60 hours of video are uploaded every minute Over 800 million unique users visit You. Tube each month 70% of You. Tube traffic comes from outside US In 2011, You. Tube had more than 1 trillion views (140 views for every person on Earth) Source: http: //www. youtube. com/t/press_statistics CS 414 - Spring 2014

You. Tube 2014 n n n More than 1 billion unique users visit You.

You. Tube 2014 n n n More than 1 billion unique users visit You. Tube every month Total number of You. Tube videos (2014) – 120 Billion Number of videos uploaded per day – about 200, 000 Time required to see all videos – over 600 years Amount of content uploaded every minute – 100 hours 80% of You. Tube traffic comes from outside of US Source: http: //www. youtube. com/t/press_statistics CS 414 - Spring 2014

Video Playback Issues n Single Stream Playback ¨ Possible n Problem: ? ? ¨

Video Playback Issues n Single Stream Playback ¨ Possible n Problem: ? ? ¨ Possible n approach – prefetch just short video part Problem: ¨ ¨ ¨ n approach – buffer the whole stream Prevent starvation Minimize buffer space requirement Minimize initiation latency Multiple Streams Playback ¨ Possible n Problem: ? ? ¨ Possible n approach – dedicate a disk to each stream approach – multiple streams per disk Problems: ? ? CS 414 - Spring 2014

Media Server Architecture Delivered data Incoming request Network Attachment Content Directory/Distribution Memory Management File

Media Server Architecture Delivered data Incoming request Network Attachment Content Directory/Distribution Memory Management File System Storage management Disk control - scheduling Storage device CS 414 - Spring 2014

Storage Device- Disk Layout Zoned Disk (ZBR – Zone Bit Recording) Traditional Random Access

Storage Device- Disk Layout Zoned Disk (ZBR – Zone Bit Recording) Traditional Random Access Disk Layout Track Sector Advantage: Easy mapping of location Information to head movement and disk rotation Problem: loss of storage space Advantage: Sector size same Rotation speed constant; efficient Usage of space CS 414 - Spring 2014

Storage/Disk Management n Optimal placement of MM data blocks ¨ Single disk ¨ multiple

Storage/Disk Management n Optimal placement of MM data blocks ¨ Single disk ¨ multiple disks Timely disk scheduling algorithms and sufficient buffers to avoid jitter n Possible Admission control n CS 414 - Spring 2014

Storage Management n Storage access time to read/write disk block is determined by 3

Storage Management n Storage access time to read/write disk block is determined by 3 components ¨ Seek n Time required for the movement of read/write head ¨ Rotational n Time during which transfer cannot proceed until the right block or sector rotates under read/write head ¨ Data n Time (Latency Time) Transfer Time needed for data to copy from disk into main memory CS 414 - Spring 2014

Impact of Access Time Metrics If data blocks are arbitrarily placed n If requests

Impact of Access Time Metrics If data blocks are arbitrarily placed n If requests are served on FCFC basis n Then effort for locating data place may cost time period in order of magnitude 10 ms n This performance degrades disk efficiency n Need techniques to reduce seek, rotation and transmission times !!! n CS 414 - Spring 2014

MM Data Placement on Single Disk Continuous Placement Non-contiguous Placement Simple to implement, but

MM Data Placement on Single Disk Continuous Placement Non-contiguous 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 CS 414 - Spring 2014

Intra-file Seek Time Intra-file seek – can be avoided in noncontiguous layout if the

Intra-file Seek Time Intra-file seek – can be avoided in noncontiguous layout if the amount read from a stream always evenly divides block n Solution: select sufficient large block and read one block in each round n ¨ If more than one block is required to prevent starvation prior to next read, deal with intra-file seek n Solution: constrained placement or logstructure placement CS 414 - Spring 2014

Non-continuous Placement CS 414 - Spring 2014

Non-continuous Placement CS 414 - Spring 2014

Constrained Placement n Approach: separation between successive file blocks is bounded ¨ Bound on

Constrained Placement n Approach: separation between successive file blocks is bounded ¨ Bound on separation – not enforced for each pair of successive blocks, but only on average over finite sequence of blocks ¨ Attractive for small block sizes ¨ Implementation – expensive n For constrained latency to yield full benefit, scheduling algorithm must retrieve immediately all blocks for a given stream before switching to another stream CS 414 - Spring 2014

Log-Structure Placement n This approach writes modified blocks sequentially in a large contiguous space,

Log-Structure Placement n This approach writes modified blocks sequentially in a large contiguous space, instead of requiring seek for each block in stream when writing (recording) ¨ Reduction of disk seeks ¨ Large performance improvements during recording, editing video and audio n n Problem: bad performance during playback Implementation: complex CS 414 - Spring 2014

MM Data Placement at Multiple Disks Data Interleaving On single disk (consecutive blocks are

MM Data Placement at Multiple Disks Data Interleaving On single disk (consecutive blocks are placed on The same cylinder But in interleaved way Data Interleaving On Multiple Disks (Disks are not Synchronized) Striping data across Multiple disks CS 414 - Spring 2014

Disk Scheduling Policies n Goal of Scheduling in Traditional Disk Management ¨ Reduce cost

Disk Scheduling Policies n Goal of Scheduling in Traditional Disk Management ¨ Reduce cost of seek time ¨ Achieve high throughput ¨ Provide fair disk access n Goal of Scheduling in Multimedia Disk Management ¨ Meet deadline of all time-critical tasks ¨ Keep necessary buffer requirements low ¨ Serve many streams concurrently ¨ Find balance between time constraints and efficiency CS 414 - Spring 2014

Disk Scheduling Framework n Must support multiple Qo. S levels and requests CS 414

Disk Scheduling Framework n Must support multiple Qo. S levels and requests CS 414 - Spring 2014 Source: Reddy et al, “Disk Scheduling in a Multimedia I/O System”, ACM TOMCCAP 2005

EDF (Earliest Deadline First) Disk Scheduling n Each disk block request is tagged with

EDF (Earliest Deadline First) Disk Scheduling n Each disk block request is tagged with deadline ¨ Very n good scheduling policy for periodic requests Policy: ¨ Schedule disk block request with earliest deadline ¨ Excessive seek time – high overhead ¨ Pure EDF must be adapted or combined with file system strategies CS 414 - Spring 2014

EDF Example Note: Consider that block number Implicitly encapsulates the disk track number CS

EDF Example Note: Consider that block number Implicitly encapsulates the disk track number CS 414 - Spring 2014

Conclusion Media Server Architecture n Storage Management n ¨ Data/file placement on single disk

Conclusion Media Server Architecture n Storage Management n ¨ Data/file placement on single disk ¨ Data/file placement on multiple disks Disk Scheduling – important component in the timely delivery of streams n Admission should be done if one cares not to over subscribe n CS 414 - Spring 2014