Transport of Real-Time Traffic over the Internet Bernd Girod Information Systems Laboratory Stanford University THE MEANING OF FREE SPEECH The acquisition by eBay of Skype is a helpful reminder to the world's trilliondollar telecoms industry that all phone calls will eventually be free . . . . . . Ultimately—perhaps by 2010—voice may become a free internet application, with operators making money from related internet applications like IPTV . . . [Economist, September 2005] B. Girod: Internet Real-Time Transport, September 2005 2 IPTV Rollout Verizon 10M households by 2009 IPTV SBC 18M households by 2007 [IEEE Spectrum, Jan. 2005] B. Girod: Internet Real-Time Transport, September 2005 3 Why Is Real-Time Transport Hard? Internet is a best-effort network . . . Congestion Packet loss Delay Insufficient rate to communicate Impairs perceptual quality Impairs interactivity of services; Telephony: one way delay < 150 ms [ITU-T Rec. G.114] Delay jitter Obstructs continuous media playout B. Girod: Internet Real-Time Transport, September 2005 4 Outline of the Talk • • • • • QoS vs. best effort Resource allocation for IPTV Rate-distortion optimized streaming Multi-path routing P2P multicasting of live video streams B. Girod: Internet Real-Time Transport, September 2005 5 How 1B Users Share the Internet TCP Throughput Rate r maximum transfer unit data rate Growing congestion 1.22 MTU r RTT p round trip time packet loss rate 0.0001 0.001 0.01 0.1 p [Mahdavi, Floyd, 1997] [Floyd, Handley, Padhye, Widmer, 2000] B. Girod: Internet Real-Time Transport, September 2005 6 QoS vs. Best Effort Reservation-ism Best Effort-ism – Voice and video need guaranteed QoS (bandwidth, loss, delay) – Implement admission control: “Busy tone” when network is full – Best effort is fine for data applications B. Girod: Internet Real-Time Transport, September 2005 – Best Effort good enough for all applications – Real-time applications can be made adaptive to cope with any level of service – Overprovisioning always solves the problem, and it’s cheaper than QoS guarantees 7 Simple Model of A Shared Link • Link of capacity C is shared among k flows C • Fair sharing: each flow uses data rate C/k • Homogeneous flows with same utility function u(.) • Total utility C U k k u k [Breslau, Shenker, 1998] B. Girod: Internet Real-Time Transport, September 2005 8 Rigid Applications • Utility u=0 below of minimum bit-rate B u 1 B • Maximum total utility U=k* is achieved by admitting at most k* flows C/k C C k * arg max k u k k B [Breslau, Shenker, 1998] B. Girod: Internet Real-Time Transport, September 2005 9 Rigid Applications (cont.) • Expected loss in total utility w/o admission control C C DU Pr k B B • Gap DU is substantial when number of admissable flows k* is small • Gap DU usually disappears with growing capacity C Overprovisioning can solve the problem! [Breslau, Shenker, 1998] B. Girod: Internet Real-Time Transport, September 2005 10 Elastic Applications • Elastic applications: utility function u(k), such that total utility U(k)=ku(C/k) increases with k • Example: u u(C/k)=1-aC/k C/k • All flows should be admitted: best effort! B. Girod: Internet Real-Time Transport, September 2005 11 Video Compression • H.264 video coding for 2 different testsequences Good picture quality 44 42 Y-PSNR in dB 40 38 36 34 32 Foreman mobile 30 Bad picture quality • Video is elastic application • Rate must be adapted to network throughput • How to achieve rate control for stored content or multicasting? • Utility function depends on content: should use unequal rate allocation Mobile foreman 28 26 24 0 500 1000 1500 2000 2500 3000 3500 4000 encoding rate in kbps B. Girod: Internet Real-Time Transport, September 2005 12 Different Utility Functions • Example: uk(rk)=1-akrk Equal-slope “Pareto condition” uk rk Vilfredo Pareto 1848-1923 • With rk>=0 Karush-Kuhn-Tucker conditions (“reverse water-filling”) • Better than utility-oblivious “fair” sharing B. Girod: Internet Real-Time Transport, September 2005 13 Distribution of IPTV over WLAN 5 Mbps 11 Mbps 2 Mbps Home Media Gateway [courtesy: van Beek, 2004] B. Girod: Internet Real-Time Transport, September 2005 14 Video Streaming Over Shared Channel Transcoder 0 Decoder 0 Transcoder 1 Decoder 1 Transcoder 2 Decoder 2 Transcoder 3 Decoder 3 Receiver (Multi-Channel) Controller [Kalman, van Beek, Girod 2005] B. Girod: Internet Real-Time Transport, September 2005 15 Tx Backlog for 4 Video Streams backlog in frames 85% WLAN Utilization 10 10 8 8 6 6 4 4 2 2 backlog in frames 0 0 10 20 30 40 0 10 10 8 8 6 6 4 4 2 2 0 0 10 20 30 40 time in seconds 0 0 10 20 30 40 0 10 20 30 40 time in seconds [Kalman, van Beek, Girod 2005] B. Girod: Internet Real-Time Transport, September 2005 16 Streaming of Stored Content Media files are already compressed: How can we nevertheless adapt to network? 100s to 1000s simultaneous streams DSL Cable wireless Server Network B. Girod: Internet Real-Time Transport, September 2005 Client 17 Not All Packets are Equally Important I I I B P B P B P I B P B P B P … … … A A B. Girod: Internet Real-Time Transport, September 2005 … 18 Not All Packets are Equally Important I I I B P B P B P I B P B P B P … … … A A B. Girod: Internet Real-Time Transport, September 2005 … 19 Distortion-Aware Packet Dropping Good Picture quality Bad picture quality Distortion aware Oblivious Packet dropping No retransmissions QCIF Carphone I-P-P-P-P-P- . . . Percentage of Packets Retained [%] [Chakareski, Girod, ICME 2004] B. Girod: Internet Real-Time Transport, September 2005 20 Rate-Distortion Optimized (RaDiO) Streaming “Decide which packets to send (and when) to maximize picture quality while not exceeding an average rate” [2001] Repeat request Video data Rate-distortion preamble Request Packet stream schedule Server Network B. Girod: Internet Real-Time Transport, September 2005 Client 21 A Brief History of Media Streaming 1) Media streaming w/o congestion avoidance: “reckless driving” [1995] 2) TCP-friendly rate control: “Limit average rate for fair sharing with TCP” [1997] 3) Rate-distortion optimized packet scheduling (RaDiO): “Decide which packets to send (and when) to maximize picture quality while not exceeding an average rate” [2001] 4) Congestion-distortion-optimized scheduling/routing (CoDiO): “Decide which packets to send (and when) to maximize picture quality while minimizing network congestion.” [2004] B. Girod: Internet Real-Time Transport, September 2005 22 Congestion vs. Rate • Congestion: queuing delay that packets experience – weighted by size of the packet – averaged over all packets in the network • Congestion increases nonlinearly with link bit-rate Congestion D [seconds] Example: M/M/1 model D= 1 R max -R Rmax Rate R B. Girod: Internet Real-Time Transport, September 2005 23 Video Distortion with Self Congestion Good Picture quality Self congestion causes late loss Bad picture quality Bit-Rate [kbps] B. Girod: Internet Real-Time Transport, September 2005 24 Streaming with Last Hop Bottleneck Random cross traffic High bandwidth links Video traffic Acknowledgments B. Girod: Internet Real-Time Transport, September 2005 Low bandwidth last hop 25 Delay distribution • Overall delay distribution pdf delay • Queue length determines delay of last hop C B. Girod: Internet Real-Time Transport, September 2005 26 PSNR [dB] PSNR [dB] Comparison RaDiO vs. CoDiO Rate [kbps] Simulations using H.263+ 50 % End-to-end delay [ms] Rate : 10 fps Sequence : Foreman (32kbps,32kbps) Sequence length : 60s Playout deadline : 600ms B. Girod: Internet Real-Time Transport, September 2005 27 How To Avoid Traffic Jams? • Avoid congested times . . . Congestion-aware packet scheduling • Avoid congested roads . . . Congestion-aware routing B. Girod: Internet Real-Time Transport, September 2005 28 Multipath Routing for Minimum Congestion Mesh network, fully connected Streaming 100 kbps from Node 1 to Node 5 Random cross traffic 31 kbps 16kbps 15 77 5 2 18 23 B. Girod: Internet Real-Time Transport, September 2005 22 2 45 7 35 8 23 24 8 43 6 64 24 249 29 Multipath Video Streaming Good Picture quality 6 dB Sequence : Foreman QCIF, 250 frames, 30 fps Codec: H.26L TML 8.5 Bad picture quality Playout deadline : 500 ms Packetization : 1 frame/packet Traffic model: CBR No. of realizations: 400 Bit-Rate [kbps] B. Girod: Internet Real-Time Transport, September 2005 30 Multipath Video Streaming 1 path 80 kbps, PSNR 32.5 dB B. Girod: Internet Real-Time Transport, September 2005 3 paths 187 kbps, PSNR 36.2 dB 31 Distribution of Live Streams via “Pseudo-Multicast” Content delivery network Example Media server AOL webcast of Live 8 concert July 2, 2005 ... Splitter servers 1500 servers in 90 locations 50 Gbps ... ... ... ... ... 175,000 simultaneous viewers 8M unique viewers B. Girod: Internet Real-Time Transport, September 2005 32 Distribution of Live Streams via “Pseudo-Multicast” Content delivery network Splitter servers Example Media server AOL webcast of Live 8 concert July 2, 2005 ... 300 kbps P2P live multicast ... ... ... ... 1500 servers in 90 locations 50 Gbps ... 175,000 simultaneous viewers 8M unique viewers B. Girod: Internet Real-Time Transport, September 2005 33 P2P Multicast over 1 Tree B. Girod: Internet Real-Time Transport, September 2005 34 P2P Multicast over 2 Trees B. Girod: Internet Real-Time Transport, September 2005 35 P2P Ungraceful Parent Leave New parent Parent leave Retransmissions Parent yellow Yellow tree isis 3 of trees selected detected tree requested is down recovered Hello, Yellow Tree Parent? B. Girod: Internet Real-Time Transport, September 2005 36 Experimental Set-up • Network/protocol simulation in ns-2 – 1000 nodes – 300 active peers – Random peer arrival/departure: ON (5 min)/OFF (30 s) – Over-provisioned backbone – Typical access bandwidth distribution – Delay: 5 ms/link + congestion • Video streaming – Compression H.264 at 220 kbps – 15 minute live multicast [Setton, Noh, Girod, ACM MM 2005] B. Girod: Internet Real-Time Transport, September 2005 37 Join and Rejoin Latencies [Setton, Noh, Girod, ACM MM 2005] B. Girod: Internet Real-Time Transport, September 2005 38 Congestion-Distortion Optimized P2P Live Streaming Without CoDiO % peers connected to 4/4 trees With CoDiO % peers connected to 4/4 trees [Setton, Noh, Girod, ACM MM 2005] B. Girod: Internet Real-Time Transport, September 2005 39 P2P Video Multicast: 64 out of 300 Peers Congestion-distortion optimized (CoDiO) streaming H.264 @ 220 kbps 2 sec latency for all streams B. Girod: Internet Real-Time Transport, September 2005 Without CoDiO 40 Concluding Remarks • Over-provisioning makes QoS superfluous • Elastic applications don’t need QoS • Joint rate control for access bottlenecks (e.g. IPTV, WLAN) • Media-aware congestion control (e.g. CoDiO) • Multipath routing to mitigate congestion • P2P viable alternative for content delivery networks Client-server edge-based P2P B. Girod: Internet Real-Time Transport, September 2005 41 The End http://www.stanford.edu/~bgirod/publications.html