Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 26 – Media Server (Part 2) Klara Nahrstedt Spring 2011.

Similar presentations


Presentation on theme: "CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 26 – Media Server (Part 2) Klara Nahrstedt Spring 2011."— Presentation transcript:

1 CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 26 – Media Server (Part 2) Klara Nahrstedt Spring 2011

2 Outline Storage Management Multimedia Data Placement Strategies on Disk Multiple Disks and Multimedia RAID Data Striping Group Creation Disk Management Data Interleaving Disk Scheduling EDF ; SCAN-EDF CS Spring 2011

3 Client/Server Video-on-Demand System CS Spring 2011

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

5 Some Facts on YouTube Video Service (from 2009) Checked with videos-served-per-day / videos-served-per-day / Over 1 billion videos per day Bandwidth accounts for about 51% of expenses -- with a run rate of $1 million per day -- with content licensing accounting for 36% YouTube_May_Lose_470_Million_In_2009_Analysts.php CS Spring 2011

6 YouTube Video Server (2010) utube-at-5-years-old-2-billion-served-per- day/ utube-at-5-years-old-2-billion-served-per- day/ 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 Spring 2011

7 Media Server Architecture CS Spring 2011 Storage device Disk controller (Disk Management) Storage management File System Memory Management Content Directory Network Attachment Incoming request Delivered data

8 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 Spring 2011

9 Placement of MM Data Blocks on Single Disk CS Spring 2011 Continuous PlacementScattered 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

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

11 Scattered Non-continuous Placement CS Spring 2011

12 Constrained Placement 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 For constrained latency to yield full benefit, scheduling algorithm must retrieve immediately all blocks for a given stream before switching to another stream CS Spring 2011

13 Log-Structure Placement 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 Problem: bad performance during playback Implementation: complex CS Spring 2011

14 Placement of Multiple MM Files on Single Disk Popularity concept among multimedia content - very important Take popularity into account when placing movies on disk Model of popularity distribution – Zipfs Law Movies are k th ranked if their probability of customer usage is C/k, C = normalization factor Condition holds: C/1 + C/2 + … C/N = 1, N is number of customers CS Spring 2011

15 Example Assume N = 5 movies Problem: what is the probability that the next customer picks 3 rd ranked movie? Solution: Solve C from the equation C/1 + C/2 + C/3 + C/4 + C/5 = 1 C = Probability to pick 3 rd ranked movie is C/3 = 0.437/3 = CS Spring 2011

16 Placement Algorithm for Multiple Files on Single Disk Organ-Pipe Algorithms (Grossman and Silverman 1973) CS Spring 2011 Middle of disk (in case of traditional disk layout) 1 st rank (most popular movie) 2 nd ranked movie 3 rd 4 th 5 th 6 th 7 th 8 th 9 th Note: In case of ZBR disk layout, place most popular disks at the outer tracks

17 Need for Multiple Disks Solutions for Media Server Limitation of Single Disk: Disk Throughput Approach: 1 Maintain multiple copies of the same file on different disks Very expensive Approach 2: Scatter multimedia file across multiple disks CS Spring 2011

18 Approach: Data Striping RAID (Redundant Arrays of Inexpensive Disks) Addresses both performance and security (0-6) RAID levels – different approach at combining performance enhancements with security/fault-tolerance enhancements Disks spindle synchronously Operate in lock-step parallel mode Striping improves BW, but does not improve seek or rotational delay CS Spring 2011

19 Data Striping – Group Creation CS Spring 2011 Multiple RAID: Creation of Subgroups of disks into independent logical disk arrays; limits # of disks per file Declustering: Groups are not made up of complete disks ; # of disks for any stripe is fixed and of same size, but disks on which stripe is located differs Dynamic Declustering: Non - static strip allocation to disks

20 Storage/Disk Management Disk access – slow and costly Reduce disk access Use block caches (anticipate future reads or writes) Reduce disk arm motion Blocks accesses in sequence (continuously), place together on one cylinder Interleaved vs non-interleaved storage CS Spring 2011

21 Data Interleaving CS Spring 2011 Data Interleaving On Multiple Disks (Disks are not Synchronized) Data Interleaving On single disk (consecutive blocks are placed on The same cylinder But in interleaved way

22 Disk Scheduling Policies Goal of Scheduling in Traditional Disk Management Reduce cost of seek time Achieve high throughput Provide fair disk access 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 Spring 2011

23 Disk Scheduling Framework Must support multiple QoS levels and requests CS Spring 2011 Source: Reddy et al, Disk Scheduling in a Multimedia I/O System, ACM TOMCCAP 2005

24 EDF (Earliest Deadline First) Disk Scheduling Each disk block request is tagged with deadline Very 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 Spring 2011

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

26 Conclusion Disk Scheduling – important component in the timely delivery of streams Admission should be done if one cares not to over subscribe CS Spring 2011


Download ppt "CS 414 - Spring 2011 CS 414 – Multimedia Systems Design Lecture 26 – Media Server (Part 2) Klara Nahrstedt Spring 2011."

Similar presentations


Ads by Google