Balancing Throughput, Robustness, and In

Balancing Throughput, Robustness,
and In-Order Delivery in P2P VoD
Bin Fan+, David Andersen+,
Michael Kaminsky* and Konstantina
Papagiannaki*
+
Carnegie Mellon University * Intel Labs Pittsburgh
1
Outline
• Motivation
• Tradeoff Analysis
• Experimental Validation
2
P2P Basics
Peer1
Seed
2
1
2
3
File
4
4
5
Peer2
1
2
3
5
3
P2P VoD Design
• Goals
High Throughput
Fully In Order
• Large Design Space
– Which chunks to download
– Which peers to download/upload
4
1st Attempt: BitTorrent
• Rarest Random
– Fetch the rarest chunk
5
Use BitTorrent for VoD
• Select the rarest chunk to download
Downloading complete
# of Played
Chunks
# of Total
Downloaded
Chunks
# of Useful
Chunks
Starting Playback t
+ Complete downloading soon
- Can not start playback until the end
6
2nd Attempt: Naïve Sequential
• Rarest Random
– Fetch the rarest chunk
• Naïve Sequential
– Fetch the next chunk
7
Naive Sequential Downloading
• Change BitTorrent to download sequentially:
Throughput collapsed
# of Total
Downloaded
Chunks
# of Useful
Chunks
# of Played
Chunks
t
+ Sequential download
- Low througput
8
Question
• Can we achieve both high throughput and
sequential peer-to-peer download?
9
Outline
• Motivation
• Tradeoff Analysis
1. Modeling throughput
2. Study basic schemes
3. TRS Trdeoff
• Experimental Validation
10
Per-chunk Capacity
Peer1
Ci (Per-chunk capacity of chunk i):
The aggregated uplink
bandwidth for chunk i from seeds
and peers
Seed
2
3
File
5
Uplink BW
1
2
3
File
4
5
Peer2
Uplink Bandwidth
1
2
4
Uplink BW
11
Per-chunk Capacity & Throughput
• Ci: Per-chunk capacity for chunk i
• System throughput = Min{Ci}
– See proof in paper
C1 C2 C3 C4
System Throughput
C5
Chunk5:
Bottleneck
Chunk
12
Metrics
• Throughput
– Minimal Per-chunk capacity
• Robustness
– Number of sources to download each chunk
• Sequentiality
– Order of chunk arrival
13
Three Basic Schemes
• Rarest Random
– Fetch the rarest chunk
• Naïve Sequential
– Fetch the next chunk
• Cascading [Annapureddy07, Yang09]
– Form a chain to fetch
14
Rarest Random
• Chunks uniformly distributed
✓ Each chunk gets about the same capacity to
replicate
C1=C2=…=Cm
✓ Many sources for each chunk
C1 C2 C3 C4 C5
✗ Out of order
15
Naïve Sequential
• Many copies of 1st chunk, few copies of last
chunk
✗ Low throughput: later chunk gets less chance to
replicate
C1 C2
C1>C2>…>Cm
C3
C4 C5
✓ Many sources for each chunk,
on average
✓ Fully in order
16
Cascading
• Skewed chunks distribution
✓ Each chunk gets same chance to replicate
C1=C2=…=Cm
C1 C2 C3 C4 C5
✗ Few sources for each chunk
✓ Fully in order
17
TRS Tradeoff
TRS Tradeoff
High Throughput
Cascading
Rarest Random
Impossible to achieve at
the same time:
(1)Maximal throughput
(2)purely sequential
retrieval
(3)perfectly robust
See proof in paper
Naïve Sequential
Fully In Order
18
Intuition of TRS Tradeoff
• Caused by resource contention among
chunks
– Downloading chunks in order leads to
skewed distribution
– Skewed distribution imposes
• Either imbalanced per-chunk capacity
allocation
• Or limited sources allowed to serve each chunk
19
TRS Tradeoff in the Real World
Homogeneous nodes
Heterogeneous nodes
Rarest
Random
Naive
Sequential
Cascading
20
Balance the Tradeoff
• Maintain high throughput
– Ensure “less skewed” per-chunk capacity
• Slightly reduce sequentiality
– Intuition: 95% sequential is good enough for
playback
• Slightly reduce robustness
– Intuition: 20 sources are nearly as robust as 100
sources
21
Three Hybrid Schemes
• Hybrid Sequential
[Huang08]
– Rarest random + sequential
• Segment random
– Fetch segment in order
– Fetch chunks in one segment
out of order
• Network coding
[Annapureddy07]
– Each segment encoded
22
Outline
• Motivation
• Tradeoff Analysis
• Experimental Validation
23
Evaluation
•
•
•
•
50 Peers on Emulab
10 Mbps up, 20 Mbps down
One seed
Modified BitTornado Client
24
Homogeneous Peers
2 peers/min
12
6 peers/min
10 peers/min
Tput of each Peer: Mpbs
10
8
6
4
2
0
rr
seq
cascading
30% rr+70%seq
80% rr+20%seq
25
Heterogeneous Peers
With no slow
peers
12
Tput of each Peer: Mpbs
10
With slow peers
8
6
4
2
0
rr
seq
cascading
30% rr+70%seq
80% rr+20%seq
26
Conclusion
• Motivated by how to build efficient p2p VoD
• TRS Tradeoff:
– Throughput vs Robustness vs Sequentiality
• Framework to understand tradeoff space
• Experimental Validation
27