A Simple Model for Analyzing P2P Streaming Protocols

26
A Simple Model for Analyzing P2P Streaming Protocols Zhou Yipeng Chiu DahMing John, C.S. Lui The Chinese University of Hong Kong

description

A Simple Model for Analyzing P2P Streaming Protocols. Zhou Yipeng Chiu DahMing John, C.S. Lui The Chinese University of Hong Kong. Outline. Introduction Model & Chunk Selection Strategies Simulation Conclusion. Bottleneck. Waste Bandwidth. Introduction. Unicast - PowerPoint PPT Presentation

Transcript of A Simple Model for Analyzing P2P Streaming Protocols

Page 1: A Simple Model for Analyzing P2P Streaming Protocols

A Simple Model for Analyzing P2P Streaming Protocols

Zhou Yipeng Chiu DahMing John, C.S. Lui

The Chinese University of Hong Kong

Page 2: A Simple Model for Analyzing P2P Streaming Protocols

Outline

Introduction Model & Chunk Selection Strategies Simulation Conclusion

Page 3: A Simple Model for Analyzing P2P Streaming Protocols

Introduction Unicast Client server is the bottleneck and waste bandwidth

Router

WasteBandwidth

Bottleneck

Page 4: A Simple Model for Analyzing P2P Streaming Protocols

Untapped

bandwidth resource

Weak point

Introduction Application Layer Multicast (or CDN)

Rely on a single distribution tree

serverLeaf peers

Page 5: A Simple Model for Analyzing P2P Streaming Protocols

IntroductionP2P Streaming System -P2P resolves this scalability problem by using all resources of all clients. It is like

using multiple trees simultaneously to deliver content.

Server

Peer

Peer

Peer

Peer

Peer

Peer

Fully connected

Peers maintain: * buffer * neighbor list

Page 6: A Simple Model for Analyzing P2P Streaming Protocols

Introduction

P2P application: -file distribution, p2p streaming

Summary work on p2p streaming: -PPlive, PPstream, CoolStreaming, BiTos -Much work on system study, architecture design and measurement but little

theoretic work

Our Contributions: -Analytical Models on p2p streaming system to better understand -Chunk selection strategy study and a new strategy is proposed. -Trade off between continuity and scalability

Page 7: A Simple Model for Analyzing P2P Streaming Protocols

Outline

Introduction Model & Chunk Selection Strategies Simulation Conclusion

Page 8: A Simple Model for Analyzing P2P Streaming Protocols

Model & Chunk Selection Strategies

How buffer works?

Server sends out chunks sequentially.

Peer downloads one chunk every time slot

Buffer shits ahead one position one time slot

playback

server

1

t=1

2 1

t=2

3 2 1

t=3

Buffer

……….

Page 9: A Simple Model for Analyzing P2P Streaming Protocols

Model & Chunk Selection Strategies M peers with the same

playback requirement Each has a playback buffer In each time slot, the server

randomly selects one peer and uploads one chunk

Users’ metric is the continuity, defined as p(n) , the probability chunk n available

To compute p(n), recursively compute p(i). p(i) is defined as:

p(i)=prob(position i filled)

1 2 …………… n

1 2 …………… n

1 2 …………… n

… M peers

playback

server

1/M

1/M

1/M

Page 10: A Simple Model for Analyzing P2P Streaming Protocols

P2p technology effect

Model & Chunk Selection Strategies Each peer’s buffer is a sliding

window In each time slot, each peer

downloads a chunk from server or its neighbor

q(i) = the probability Buf[i] gets filled at this time slot, for i>1

1 2 …………… n

p(1)=1/M p(n)=?

time=t

1 2 …………… n t+1

p(1)=1/M

sliding window

)()()1( iqipip

Page 11: A Simple Model for Analyzing P2P Streaming Protocols

Model & Chunk Selection Strategies

w(i) = probability peer wants to fill Buf[i]

w(i)=1-p(i) h(i) = probability the

selected peer has the content for Buf[i]

h(i)=p(i) s(i) = Buf[i] determined by

chunk selection strategy

)()()()( isihiwiq

1 2 …… i … n

p(1)=1/M p(n)

peer

1 2 .….. i … n neighbor

p(1)=1/M

sliding window

)()()()( isihiwiq

Page 12: A Simple Model for Analyzing P2P Streaming Protocols

Buffer map X X X X

1 2 3 4 5 6 7 8playback

Model & Chunk Selection Strategies

Greedy Strategy -try to fill the empty buffer closest to playback Rarest First Strategy -try to fill the empty buffer for the newest chunk since p(i) is an

increasing function, this means “Rarest First” An example

RF Selection Greedy Selection

Page 13: A Simple Model for Analyzing P2P Streaming Protocols

Model & Chunk Selection Strategies

Greedy p(i+1)=p(i)+ (1-p(i)) * p(i) * (1-p(1)-p(n)+p(i+1))

Rarest first p(i+1)=p(i)+ (1-p(i)) * p(i) * (1-p(i))

Also studied continuous forms for these difference equations to study

sensitivity Simulation to validate models

s(i)h(i)w(i)

w(i) h(i) s(i)

Page 14: A Simple Model for Analyzing P2P Streaming Protocols

Model & Chunk Selection Strategies

From our models we can get the following conclusions:

Rarest First Strategy is more scalable than the Greedy Strategy as the peer population increases.

The Greedy Strategy can achieve better continuity than Rarest First Strategy for small number of peers.

Page 15: A Simple Model for Analyzing P2P Streaming Protocols

A New Chunk Selection Strategy Partition the buffer into [1,m] and [m+1,n] Use RF for [1,m] first If no chunks available for download by RF, use Greedy for [m+1,n]

Difference equations become

for i = 1,…,m-1

for i = m, … n-1))1()()(1))((1)(()()1(

))(1)(()()1(

1)1(

2

ipnpmpipipipip

ipipipip

Mp

Buffer map 1 …….. .. m

First do RF Second do Greedy

m+1 ....……… n

Page 16: A Simple Model for Analyzing P2P Streaming Protocols

Outline

Introduction Model & Chunk Selection Strategies Simulation Conclusion

Page 17: A Simple Model for Analyzing P2P Streaming Protocols

Comparing Different Chunk Selection Strategies

What do you mean by “better”? Playback continuity: p(n) as large as possible Start-up Latency:

Given buffer size (n) and relatively large peer population (M)1) “Rarest first” is better in continuity!

2) “Greedy” is the best in start-up latency

3) “Mixed” is the best one of them

1/p(i)/][1i

n

DRChunksE

Page 18: A Simple Model for Analyzing P2P Streaming Protocols

Simulation

M=1000 N=40 In simulation,

# neighbors=60 Uploads at most 2

in each time slot for one peer

Validate our model

Page 19: A Simple Model for Analyzing P2P Streaming Protocols

Simulation

1000 peers, 40 buffer Compare three strategies, especially the curve for

Mixed.

Rarest First

Greedy

Mixed

Page 20: A Simple Model for Analyzing P2P Streaming Protocols

Simulation

1000 peers, buffer length varies from 20 to 40.

For different buffer sizes

Mixed achieves best continuity than both RF and Greedy

Mixed has better start-up latency than RF

Mixed

RF

Greedy

RF

Mixed

Greedy

Page 21: A Simple Model for Analyzing P2P Streaming Protocols

Simulation

For (a), there are 40 peers. Greedy is better. For (b), the continuity requirement is fixed at 0.93. RF is

better

RF

Greedy

Greedy

RF

Page 22: A Simple Model for Analyzing P2P Streaming Protocols

Simulation

Simulate 1000 peers, 2000 time slots

Continuity is the average continuity of all peers

Continuity for Mixed is more consistent, as well highest

Mixed

Page 23: A Simple Model for Analyzing P2P Streaming Protocols

Simulation

Adjust m so that p(m) achieves a target probability (e.g. 0.3) In simulation study, 100 new peers arrive every 100 slots m adapts to a larger value as population increases

How to adapt m for the mixed strategy Mixed

RF

Page 24: A Simple Model for Analyzing P2P Streaming Protocols

Outline

Introduction Model & Chunk Selection Strategies Simulation Conclusion

Page 25: A Simple Model for Analyzing P2P Streaming Protocols

Conclusion

Related work -Coolstreaming, BiTos

Summary work on p2p streaming: -There are many designed p2p streaming systems, such as PPLive, PPstream

-Many measurement papers on these system

-Little work on model analysis

-Little study on chunk selection strategies

Our Contribution: -Analytical Models on p2p streaming system to better understand

-Chunk selection strategy study

-Mixed strategy is proposed, which is better than RF or Greedy

-Trade off between continuity and scalability

Page 26: A Simple Model for Analyzing P2P Streaming Protocols