A simple model for analyzing P2P streaming protocols. Seminar on advanced Internet applications and systems Amit Farkash. 1.

Slides:



Advertisements
Similar presentations
Dissemination-based Data Delivery Using Broadcast Disks.
Advertisements

Replication Strategies in Unstructured Peer-to-Peer Networks Edith Cohen Scott Shenker This is a modified version of the original presentation by the authors.
Resource Management §A resource can be a logical, such as a shared file, or physical, such as a CPU (a node of the distributed system). One of the functions.
CSE 522 Real-Time Scheduling (4)
Rarest First and Choke Algorithms are Enough Arnaud LEGOUT INRIA, Sophia Antipolis France G. Urvoy-Keller and P. Michiardi Institut Eurecom France.
Variance reduction techniques. 2 Introduction Simulation models should be coded such that they are efficient. Efficiency in terms of programming ensures.
Playback delay in p2p streaming systems with random packet forwarding Viktoria Fodor and Ilias Chatzidrossos Laboratory for Communication Networks School.
Optimization of Data Caching and Streaming Media Kristin Martin November 24, 2008.
Kangaroo: Video Seeking in P2P Systems Xiaoyuan Yang †, Minas Gjoka ¶, Parminder Chhabra †, Athina Markopoulou ¶, Pablo Rodriguez † † Telefonica Research.
Peer-assisted On-demand Streaming of Stored Media using BitTorrent-like Protocols Authors: Niklas Carlsson & Derek L. Eager Published in: Proc. IFIP/TC6.
Capacity of Wireless Channels
G. Alonso, D. Kossmann Systems Group
Infinite Horizon Problems
1 Rare Event Simulation Estimation of rare event probabilities with the naive Monte Carlo techniques requires a prohibitively large number of trials in.
Efficient and Flexible Parallel Retrieval using Priority Encoded Transmission(2004) CMPT 886 Represented By: Lilong Shi.
Small-world Overlay P2P Network
Constrained Consonant Broadcasting- A Generalized Periodic Broadcasting Scheme for Large Scale Video Streaming W. C. Liu and Jack Y. B. Lee Department.
1 Adaptive Live Broadcasting for Highly-Demanded Videos Hung-Chang Yang, Hsiang-Fu Yu and Li-Ming Tseng IEEE International Conference on Parallel and Distributed.
Perceptual Quality Assessment of P2P Assisted Streaming Video for Chunk-level Playback Controller Design Tom Z.J. Fu, CUHK W. T. Leung, CUHK P. Y. Lam,
Locality-Aware Request Distribution in Cluster-based Network Servers 1. Introduction and Motivation --- Why have this idea? 2. Strategies --- How to implement?
Distributed Multimedia Streaming over Peer-to-Peer Network Jin B. Kwon, Heon Y. Yeom Euro-Par 2003, 9th International Conference on Parallel and Distributed.
Multiple Sender Distributed Video Streaming Thinh Nguyen, Avideh Zakhor appears on “IEEE Transactions On Multimedia, vol. 6, no. 2, April, 2004”
Quality-Aware Segment Transmission Scheduling in Peer-to-Peer Streaming Systems Cheng-Hsin Hsu Senior Research Scientist Deutsche Telekom R&D Lab USA Los.
CSE 421 Algorithms Richard Anderson Lecture 6 Greedy Algorithms.
Performance Evaluation of Peer-to-Peer Video Streaming Systems Wilson, W.F. Poon The Chinese University of Hong Kong.
Competitive Analysis of Incentive Compatible On-Line Auctions Ron Lavi and Noam Nisan SISL/IST, Cal-Tech Hebrew University.
Loopback: Exploiting Collaborative Caches for Large-Scale Streaming Ewa Kusmierek, Yingfei Dong, Member, IEEE, and David H. C. Du, Fellow, IEEE.
CUHK Analysis of Movie Replication and Benefits of Coding in P2P VoD Yipeng Zhou Aug 29, 2012.
Some recent work on P2P content distribution Based on joint work with Yan Huang (PPLive), YP Zhou, Tom Fu, John Lui (CUHK) August 2008 Dah Ming Chiu Chinese.
 Structured peer to peer overlay networks are resilient – but not secure.  Even a small fraction of malicious nodes may result in failure of correct.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 34 – Media Server (Part 3) Klara Nahrstedt Spring 2012.
Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc Chapter 11 Introduction to Hypothesis Testing.
1 Proxy-Assisted Techniques for Delivering Continuous Multimedia Streams Lixin Gao, Zhi-Li Zhang, and Don Towsley.
1 CMSCD1011 Introduction to Computer Audio Lecture 10: Streaming audio for Internet transmission Dr David England School of Computing and Mathematical.
Asaf Cohen (joint work with Rami Atar) Department of Mathematics University of Michigan Financial Mathematics Seminar University of Michigan March 11,
Exploring VoD in P2P Swarming Systems By Siddhartha Annapureddy, Saikat Guha, Christos Gkantsidis, Dinan Gunawardena, Pablo Rodriguez Presented by Svetlana.
COCONET: Co-Operative Cache driven Overlay NETwork for p2p VoD streaming Abhishek Bhattacharya, Zhenyu Yang & Deng Pan.
Developing Analytical Framework to Measure Robustness of Peer-to-Peer Networks Niloy Ganguly.
An Analysis of Chaining Protocols for Video-on-Demand J.-F. Pâris University of Houston Thomas Schwarz, S. J. Universidad Católica del Uruguay.
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems Combined Scheduling of Periodic and Aperiodic Tasks.
DELAYED CHAINING: A PRACTICAL P2P SOLUTION FOR VIDEO-ON-DEMAND Speaker : 童耀民 MA1G Authors: Paris, J.-F.Paris, J.-F. ; Amer, A. Computer.
Copyright © 2009 Cengage Learning Chapter 10 Introduction to Estimation ( 추 정 )
Web Cache Replacement Policies: Properties, Limitations and Implications Fabrício Benevenuto, Fernando Duarte, Virgílio Almeida, Jussara Almeida Computer.
1 Towards Cinematic Internet Video-on-Demand Bin Cheng, Lex Stein, Hai Jin and Zheng Zhang HUST and MSRA Huazhong University of Science & Technology Microsoft.
CCAN: Cache-based CAN Using the Small World Model Shanghai Jiaotong University Internet Computing R&D Center.
Competitive Queue Policies for Differentiated Services Seminar in Packet Networks1 Competitive Queue Policies for Differentiated Services William.
Kaleidoscope – Adding Colors to Kademlia Gil Einziger, Roy Friedman, Eyal Kibbar Computer Science, Technion 1.
A Simple Model for Analyzing P2P Streaming Protocols Zhou Yipeng Chiu DahMing John, C.S. Lui The Chinese University of Hong Kong.
O PTIMAL SERVICE TASK PARTITION AND DISTRIBUTION IN GRID SYSTEM WITH STAR TOPOLOGY G REGORY L EVITIN, Y UAN -S HUN D AI Adviser: Frank, Yeong-Sung Lin.
1 Presented by Sarbagya Buddhacharya. 2 Increasing bandwidth demand in telecommunication networks is satisfied by WDM networks. Dimensioning of WDM networks.
BALANCING THROUGHPUT, ROBUSTNESS, AND IN- ORDER DELIVERY IN P2P VOD Bin Fan, David G. Andersen, Michael Kaminsky†, Konstantina Papagiannaki † Carnegie.
Content caching and scheduling in wireless networks with elastic and inelastic traffic Group-VI 09CS CS CS30020 Performance Modelling in Computer.
A simple model for analyzing P2P streaming protocols. Seminar on advanced Internet applications and systems Amit Farkash. 1.
SHADOWSTREAM: PERFORMANCE EVALUATION AS A CAPABILITY IN PRODUCTION INTERNET LIVE STREAM NETWORK ACM SIGCOMM CING-YU CHU.
Network and Systems Laboratory nslab.ee.ntu.edu.tw Yipeng Zhou, Dah Ming Chiu, and John C.S. Lui Information Engineering Department The Chinese University.
Bit Torrent Nirav A. Vasa. Topics What is BitTorrent? Related Terms How BitTorrent works Steps involved in the working Advantages and Disadvantages.
Improving QoS in BitTorrent-like VoD Systems Yan Yang Alix L.H. Chow Leana Golubchik Dannielle Bragg Univ. of Southern California Harvard University InfoCom.
Geethanjali College Of Engineering and Technology Cheeryal( V), Keesara ( M), Ranga Reddy District. I I Internal Guide Mrs.CH.V.Anupama Assistant Professor.
Towards Robust Revenue Management: Capacity Control Using Limited Demand Information Michael Ball, Huina Gao, Yingjie Lan & Itir Karaesmen Robert H Smith.
Cost-Effective Video Streaming Techniques Kien A. Hua School of EE & Computer Science University of Central Florida Orlando, FL U.S.A.
Accelerating Peer-to-Peer Networks for Video Streaming
An example of peer-to-peer application
The Impact of Replacement Granularity on Video Caching
On Scheduling of Peer-to-Peer Video Services
Video On Demand.
Introduction to Estimation
Javad Ghaderi, Tianxiong Ji and R. Srikant
PERFORMANCE MEASURES. COMPUTATIONAL MODELS Equal Duration Model:  It is assumed that a given task can be divided into n equal subtasks, each of which.
Computer Systems Performance Evaluation
Presentation transcript:

A simple model for analyzing P2P streaming protocols. Seminar on advanced Internet applications and systems Amit Farkash. 1

The problem: The engineering of streaming video from a server to a single client is well studied and understood. This, however, is not scalable to serve a large number of clients simultaneously. P2P streaming tries to achieve scalability (like P2P file distribution) while at the same time meet real time playback requirements. It is a challenging problem still not well understood. 2

The real world: While the problem may still not be well understood in practice P2P streaming seems to be working just fine. Even in Israel where upload speed is considerably low it is possible to receive a "watchable" stream. 3

The real world: Current popular P2P streaming softwares are: Usually streaming sporting events (illegally due to copyright violation). 4

P2P streaming vs. P2P file sharing: P2P streaming is less demanding – no need for entire file. 1) Peers join the video session from the point of their arrival times. 2) Missing “just a few” frames is tolerable. P2P streaming is more demanding - real time requirements! 5

Performance metrics: We will compare downloading strategies based on two performance metrics: Continuity – probability of continues playback. Startup latency – expected time to start playback. 6

Basic model: M – Number of peers in the network. A single server streaming chunks of video in playback order to M peers. Each chunk has a sequence number starting from 1. Time is slotted. Server selects a peer randomly in time t and sends it the chunk. 7

Basic model: Each peer maintains a buffer B that caches up to n chunks. B(n) is reserved for the chunk to be played back immediately while B(1) is used to store the newest chunk, that is distributed in the current time slot. At time t chunk t-n+1 is removed from the buffer and played back by the peer while all other chunks are shifted by 1. 8

Basic model: Goal: Ensure B(n) is filled as many time slots as possible. 9

Basic model: P k (i)[t] – probability that B(i) of peer k is filled (with the correct) chunk at time t. Assumption: this probability reaches a steady state for large t, namely P k (i)[t] = P k (i). We call P k (i) the buffer occupancy probability of peer k. 10

Basic model: Simple case - only server is distributing chunks: P k (1) = P(1) = 1/M. ∀ k. P k (i+1) = P(i+1) = P(i). i=1,…,n-1. ∀ k. Obviously very poor playback for any M>1. 11

Improvement: Each peer selects another peer in each time slot to try and download a chunk not already in its buffer. If the selected peer has no useful chunk, no chunk is downloaded in that time slot. Assume all peers use the same selection strategy, therefore have the same distribution P(i). Assume peers are selected randomly. 12

Improvement: Since peers are selected randomly the probability for a peer, A,to be selected by K≥0 peers is: A(k) = If M=100, A(3) is only about 1.8 % so let's assume A's peer's upload capacity is large enough to serve all requests in each time slot. 13

Chunk selection policy: First we define the following events: WANT(K,i) = B(i) of peer K is unfilled. HAVE(H,i) = B(i) of peer H is filled. SELECT(H,K,i) = Using a chunk selection strategy, peer K cannot find a more preferred chunk than that of B(i) that satisfied WANT and HAVE. 14

Chunk selection policy: For i=1,…,n-1 we get: P(i+1) = P(i)+Pr[WANT(K,i) ∩ Pr[HAVE(H,i)] ∩ Pr[SELECT(H,K,i)] ≈ P(i) + [1-P k (i)] P h (i) SELECT(i) = P(i) + [1-P (i)] P(i) SELECT(i) Note that P(i) is an increasing function, hence collaborating improves playback performance. 15

Chunk selection policy: We used the following assumptions to simplify our equation: Assume all peers are independent so P(i) is the same for each K, therefore: WANT(K,i) = 1-P(i). Assume large enough number of peers so that knowing the state of one does not significantly affect the probability of the state of another peer, therefore: Pr[HAVE(H,i)|WANT(K,i)] ≈ Pr[HAVE(H,i)]=P(i). Assume chunks are independently distributed in the network, so the probability distribution for position i is not strongly affected by the knowledge of the state of other positions, therefore: Pr[SELECT(H,K,i)|WANT(K,i) ∩ HAVE(H,i)] ≈ Pr[SELECT(H,K,i)] = SELECT(i). 16

Chunk selection strategies: Rarest first: Select a chunk, which has the fewest number of copies in the system. Well known strategy. Gives good scalability (Continuity). Greedy: Fill empty buffer locations closer to the playback time first. Low startup latency but fares poorly in continuity. 17

Greedy: Peer K will want to select the chunk closet to the playback deadline, which it doesn't already have. If B(n) is empty, it will select it. If B(n) is filled it will select B(n-1) and so on… This means peer K will select to download chunk to B(i) if B(j) are filled for every n>j>i and it was not distributed a chunk by the server. 18

Greedy: Pr[chunk isn't downloaded to B(j)] = ¬Pr[WANT(K,j)HAVE(H,j)] = Pr[K has j] + Pr[K doesn't have j] * Pr[H doesn't have j] = P k (j) + (1-P k (j)) (1-P h (j)) = P(j) + (1-P(j))² Therefore: SELECT G (i ) Proposition: SELECT G (i) = 1 - (P(n) - P(i+1)) - P(1) For Proof see paper, proposition 1.paper 19

Rarest first: For i=1,…,n-1: P(i+1) ≥ P(i), so the expected number of copies of chunk in B(i+1) is equal or greater than the expected number of copies of chunk in B(i). This means peer K will want to select to download chunk to B(1) unless B(1) is already filled, in this case K will select B(2) and so on… 20

Rarest first: Peer K will select to download chunk to B(i) if B(j) are filled for every 1≤j<i and it was not distributed a chunk by the server: Therefore: SELECT RF (i) Proposition: SELECT RF (i) = 1 – P(i) For Proof see paper, proposition 2paper 21

Results: We get the following difference equations: Rarest First: P(i+1) ≈ P(i) + P(i) [1-P (i)]² Greedy: P(i+1) ≈ P(i) + P(i) [1-P(i)] [1-P(1)-P(n)+P(i+1)] 22

Evaluating performances: We already have Continuity: P(n). Another performance metric is start up latency, the time a peer should wait before starting playback. Assuming all other peers have already reached steady states, we argue that a newly arriving peer should wait until its buffer has reached steady state as well. 23

Start up latency Assumption: when a peer K starts with an empty buffer every other peer H it contacts is likely to have a chunk for it to download. Therefore after time slots, K is expected to have acquired the same number of chunks as H, which is also, thus we have: Start up latency =. 24

Start up latency Is there a problem here with the Greedy strategy ? Assume start up latency for the Greedy strategy is 4 time slots and that on the second time slot, it successfully downloads a chunk to position B(n-1). Since we shift positions each time slot by 1, by the time the playback starts this chunk becomes obsolete. 25

Start up latency Suggested solution: Assume the start up latency for the Greedy strategy is S g, then Greedy has to download chunks to buffer positions less than n - S g in its first attempt. Positions less than n - (S g + 1) in its second attempt and so on… until playback starts. 26

Models from comparison: Discrete model – The solution for the buffer state distribution P(i) is derived numerically. For the Greedy Strategy we first give P(n) a fixed value, substitutes n steps inversely from P(n) to P(1) and compare P(1) with 1/M. If P(1) ≈ 1/M then we get the solution, else P(n) is adjusted accordingly and the inverse substitution process is repeated. 27

Models from comparison: Continuous model – Generally solved numerically using MatLab. Simulation model – Based on the discrete model. o One server and M peers. o In each time slot the server distributes one chunk to a random peer. o Each peer selects one random peer to download one chunk from and can upload up to two peers. 28

Rarest first vs. Greedy: M=1,000, n=40: 29

Mixed strategy: Trying to achieve Rarest first’s continuity (or even better) with lower start up latency. Always try to collaborate with others in order to improve performances, but if you can’t find a “rare” chunk to download and if positions closer to the playback are still unfilled, why not try to fill them up ? 30

Mixed strategy: Partition the buffer at point m. First, try to download a chunk using Rarest first to positions 1…m. If no chunk can be downloaded using Rarest first, use Greedy for positions m+1…n. 31

Mixed strategy: Difference equations: For B(1) to B(m) same as Rarest first: P(1) = 1/M. P(i+1) ≈ P(i) + P(i) [1-P(i)]² For B(m+1) to B(n) same as Greedy but substitute B(m) for B(1): P(i+1) ≈ P(i) + P(i) [1-P(i)] [ 1-P(m)-P(n)+P(i+1)] 32

Rarest first vs. Greedy vs. Mixed: We keep buffer size at n = 40 and we set m = 10. This means for the mixed strategy that buffer positions 1 to 10 are running Rarest first while buffer positions 11 to 40 are running Greedy. We’ll present results from the discrete model. 33

Rarest first vs. Greedy vs. Mixed: 34

Rarest first vs. Greedy vs. Mixed: 35

Optimizing the Mixed Strategy: Fix n to 40 and vary m: 36

Optimizing the Mixed Strategy: Adapting to peer population: One way is to observe the value of P(m). Set a target value, say P m = 0.3 When a peer finds the average of P(m) to be less than P m the peer increases m, else the peer decreases m. 37

Optimizing the Mixed Strategy: Simulation: Initial value of m is 10. Calculate average of P(m) for 20 time slots and then set new value of m. Initially M = 100 and every 100 time slots add another 100 peers (with empty buffers). 38

Optimizing the Mixed Strategy: 39

Summary: We first saw 2 different selection strategies: Rarest first: Good continuity but higher start up latency. Greedy: Low start up latency but poor continuity. We then introduced a mixed strategy. We showed it achieves better continuity than both of the above and lower start up latency than Rarest first. We show how to optimize the Mixed strategy. 40

Summary: Application to real world protocols: The Mixed strategy can be viewed as an optimization of the CoolStreaming protocol. The presented model does not try to capture all aspects of the implementation of CoolStreaming, however, the chunk selection strategy can be incorporated. The Mixed strategy is also compatible with BiTos and can be viewed as an alternative for it. 41

Think… In this version of mixed we choose to use Rarest first initially and use Greedy only if no chunk is found using the Rarest first strategy for positions 1 to m. What about the other way around ? Generally collaborate with others in order to improve performances, however, if for some reason, positions closer to the playback remain unfilled try to fill them up first. 42

Paper: A Simple Model for Analyzing P2P Streaming Protocols.  YiPeng Zhou, Dah Ming Chiu Information Engineering Department The Chinese University of Hong Kong  John C.S. Lui Department of Computer Science & Engineering The Chinese University of Hong Kong 43