Download presentation
Presentation is loading. Please wait.
Published byEvan Norton Modified over 9 years ago
1
CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 31 – Media Server (Part 1) Klara Nahrstedt Spring 2012
2
Administrative MP2 posted MP2 Deadline – April 7, Saturday, 5pm. CS 414 - Spring 2012
3
Covered Aspects of Multimedia Image/Video Capture Media Server Storage Transmission Compression Processing Audio/Video Presentation Playback Audio/Video Perception/ Playback Audio Information Representation Transmission Audio Capture A/V Playback Image/Video Information Representation CS 414 - Spring 2012
4
Outline Media Server Requirements Media Server Layered Architecture CS 414 - Spring 2012
5
Client/Server Video-on-Demand System CS 414 - Spring 2012
6
Video-on-Demand Systems must be designed with goals: Avoid starvation Minimize buffer space requirement Minimize initiation latency (video startup time) Optimize cost CS 414 - Spring 2012
7
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 2012
8
YouTube Video Server (2010) http://tech.fortune.cnn.com/2010/05/17/yo utube-at-5-years-old-2-billion-served-per- day/ http://tech.fortune.cnn.com/2010/05/17/yo 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 414 - Spring 2012
9
YouTube Video Server (2011) Over 4 B videos are viewed a day 60 hours of video are uploaded every minute Over 800 million unique users visit YouTube each month 70% of YouTube traffic comes from outside US In 2011, YouTube had more than 1 trillion views (140 views for every person on Earth) CS 414 - Spring 2012 Source: http://www.youtube.com/t/press_statistics
10
Video Playback Issues 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 2012
11
Media Server Architecture CS 414 - Spring 2012 Storage device Disk control - scheduling Storage management File System Memory Management Content Directory/Distribution Network Attachment Incoming request Delivered data
12
Storage Device- Disk Layout CS 414 - Spring 2012 Track Sector Zoned Disk (ZBR – Zone Bit 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 same Rotation speed constant; efficient Usage of space
13
Storage/Disk Management Optimal placement of MM data blocks Single disk multiple disks Timely disk scheduling algorithms and sufficient buffers to avoid jitter Possible Admission control CS 414 - Spring 2012
14
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 2012
15
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 2012
16
MM Data Placement on Single Disk CS 414 - Spring 2012 Continuous PlacementNon-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
17
Intra-file Seek Time Intra-file seek – can be avoided in non- contiguous 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 414 - Spring 2012
18
Non-continuous Placement CS 414 - Spring 2012
19
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 414 - Spring 2012
20
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 414 - Spring 2012
21
MM Data Placement at Multiple Disks CS 414 - Spring 2012 Data Interleaving On Multiple Disks (Disks are not Synchronized) Striping data across Multiple disks 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 414 - Spring 2012
23
Disk Scheduling Framework Must support multiple QoS levels and requests CS 414 - Spring 2012 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 414 - Spring 2012
25
EDF Example CS 414 - Spring 2012 Note: Consider that block number Implicitly encapsulates the disk track number
26
SCAN-EDF Scheduling Algorithm Combination of SCAN and EDF algorithms Each disk block request tagged with augmented deadline Add to each deadline perturbation Policy: SCAN-EDF chooses the earliest deadline If requests with same deadline, then choose request according to scan direction CS 414 - Spring 2012
27
Implementation of SCAN-EDF Notation: D i be deadline of disk block request ‘i’ N i be track (block) position on disk N max be maximum number of disk tracks Deadline Modification: D i + f(N i ) f(N i ) converts track number of ‘i’ into a small perturbation of deadline Perturbation small enough so that D i + f(N i ) ≤ D j + f(N j ) for D i ≤ D j Possible f(N i ) = N i /N max CS 414 - Spring 2012
28
SCAN EDF Example (N max = 100) CS 414 - Spring 2012
29
Enhanced SCAN-EDF (1) Use more accurate perturbation of deadline Consider Actual track position of disk head ‘N’ N max – max number of disk tracks N i – next track to be considered CS 414 - Spring 2012 Head Moves Upwards
30
Enhanced SCAN-EDF (2) Algorithm: If head moves upwards (towards N max ), then (a) (b) CS 414 - Spring 2012
31
Enhanced SCAN-EDF (3) If head moves downwards (towards 1), then (a) (b) CS 414 - Spring 2012
32
Group Sweeping Algorithms Policy: Each Request consists of (Deadline, Block Number ) Disk Block Requests served in cycles In one cycle, requests divided into groups according to similar deadlines Within group use SCAN As we retrieve blocks, we may need smoothing buffers to ensure continuity CS 414 - Spring 2012
33
Group Sweeping Example CS 414 - Spring 2012
34
Mixed Scheduling (uses SSTF – Shortest Seek Time First) CS 414 - Spring 2012 Example of SSTF
35
Mixed Scheduling CS 414 - Spring 2012 SSTF (Shortest Seek Time First) + Balanced Strategy
36
Conclusion Media Server Architecture Storage Management Data/file placement on single disk Data/file placement on multiple disks Disk Scheduling – important component in the timely delivery of streams Admission should be done if one cares not to over subscribe CS 414 - Spring 2012
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.