Improving ISP Locality in BitTorrent Traffic via...
Transcript of Improving ISP Locality in BitTorrent Traffic via...
![Page 1: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/1.jpg)
Improving ISP Locality in BitTorrent
Traffic via Biased
Neighbor SelectionRuchir
Bindal, Pei Cao, William Chan
Stanford UniversityJan Medved, George Suwala, Tony
Bates, Amy ZhangCisco Systems, Inc.
![Page 2: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/2.jpg)
P2P and ISPs: Not Friends
•
P2P applications are notoriously difficult to “traffic engineer”–
ISPs: different links have different monetary costs
–
P2P applications: •
Peers are all equal
•
Choices made based on measured performance•
No regards for underlying ISP topology or preferences
![Page 3: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/3.jpg)
P2P and ISPs: Can’t Be Foes
•
ISPs: need P2P for customers•
P2P: need ISPs for bandwidth
•
Current state of affairs: a clumsy co- existence
–
ISPs “throttle”
P2P traffic along high-cost links–
Users suffer
![Page 4: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/4.jpg)
Can They Be Partners?
•
ISPs inform P2P applications of its preferences
•
P2P applications schedule traffic in ways that benefit both Users and ISPs
This paper gives an example for BitTorrent
![Page 5: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/5.jpg)
Outline
•
Review of BitTorrent•
Biased Neighbor Selection: –
Design and Implementations
–
Evaluations•
Comparison with Alternatives
![Page 6: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/6.jpg)
BitTorrent File Sharing Network
Goal: replicate K chunks of data among N nodes
•
Form neighbor connection graph
•
Neighbors exchange data
![Page 7: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/7.jpg)
BitTorrent: Neighbor Selection
Trackerfile.torrent1Seed
Whole file
A
52
3
4
![Page 8: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/8.jpg)
BitTorrent: Piece Replication
Trackerfile.torrent1Seed
Whole file
A
3
2
![Page 9: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/9.jpg)
BitTorrent: Piece Replication Algorithms
•
“Tit-for-tat”
(choking/unchoking):–
Each peer only uploads to 7 other peers at a time
–
6 of these are chosen based on amount of data received from the neighbor in the last 20 seconds
–
The last one is chosen randomly, with a 75% bias toward new comers
•
(Local) Rarest-first replication:–
When peer 3 unchokes
peer A, A selects which piece
to download
![Page 10: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/10.jpg)
Performance of BitTorrent
•
Conclusion from modeling studies: BitTorrent
is nearly optimal in idealized,
homogeneous networks–
Demonstrated by simulation studies
–
Confirmed by theoretical modeling studies•
Intuition: in a random graph,
Prob(Peer
A’s content is a subset of Peer B’s) ≤
50%
![Page 11: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/11.jpg)
Random Neighbor Selection
•
Existing studies all assume random neighbor selection–
BitTorrent
no longer optimal if nodes in the
same ISP only connect to each other•
Random neighbor selection high cross-ISP traffic
Q: Can we modify the neighbor selection scheme without affecting performance?
![Page 12: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/12.jpg)
Biased Neighbor Selection
•
Idea: of N neighbors, choose N-k from peers in the same ISP, and choose k randomly from peers outside the ISP
ISP
![Page 13: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/13.jpg)
Implementing Biased Neighbor Selection
•
By Tracker–
Need ISP affiliations of peers
•
Peer to AS maps•
Public IP address ranges from ISPs
•
Special “X-”
HTTP header
•
By traffic shaping devices–
Intercept “peer tracker” messages and manipulate responses
–
No need to change tracker or client
![Page 14: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/14.jpg)
Evaluation Methodology
•
Event-driven simulator–
Use actual client and tracker codes as much as possible
–
Calculate bandwidth contention, assume perfect fair- share from TCP
•
Network settings–
14 ISPs, each with 50 peers, 100Kb/s upload, 1Mb/s download
–
Seed node, 400Kb/s upload–
Optional “university”
nodes (1Mb/s upload)
–
Optional ISP bottleneck to other ISPs
![Page 15: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/15.jpg)
Limitation of Throttling
![Page 16: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/16.jpg)
Throttling: Cross-ISP Traffic
010
2030
40
50
Nothrottling
2.5Mbps 1.5Mbps 500kbps
Bottleneck Bandwidth
Redundancy
Redundancy: Average # of times a data chunk enters the ISP
![Page 17: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/17.jpg)
Biased Neighbor Selection: Download Times
![Page 18: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/18.jpg)
Biased Neighbor Selection: Cross- ISP Traffic
0
10
20
30
40
50
Regular k=17 k=5 k=1Neighbor Selection
Redundancy
![Page 19: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/19.jpg)
Importance of Rarest-First Replication
•
Random piece replication performs badly–
Increases download time by 84% -
150%
–
Increase traffic redundancy from 3 to 14•
Biased neighbors + Rarest-First More uniform progress of peers
![Page 20: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/20.jpg)
Biased Neighbor Selection: Single-ISP Deployment
![Page 21: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/21.jpg)
Presence of External High- Bandwidth Peers
•
Biased neighbor selection alone: –
Average download time same as regular BitTorrent
–
Cross-ISP traffic increases as # of “university”
peers increase
•
Result of tit-for-tat
•
Biased neighbor selection + Throttling: –
Download time only increases by 12%
•
Most neighbors do not cross the bottleneck–
Traffic redundancy (i.e. cross-ISP traffic) same as the scenario without “university”
peers
![Page 22: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/22.jpg)
Comparison with Alternatives
•
Gateway peer: only one peer connects to the peers outside the ISP–
Gateway peer must have high bandwidth
•
It is the “seed”
for this ISP
–
Ends up benefiting peers in other ISPs•
Caching:–
Can be combined with biased neighbor selection
–
Biased neighbor selection reduces the bandwidth needed from the cache by an order of magnitude
![Page 23: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/23.jpg)
Summary
•
By choosing neighbors well, BitTorrent
can achieve high peer performance without increasing ISP cost–
Biased neighbor selection: choose initial set of neighbors well
–
Can be combined with throttling and caching
P2P and ISPs can collaborate!
![Page 24: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/24.jpg)
Related Work
•
Many modeling studies of BitTorrent•
Simulation studies
•
Measurements of real torrents
![Page 25: Improving ISP Locality in BitTorrent Traffic via …pages.cs.aueb.gr/courses/networks/Notes2016/Lecture05/...Improving ISP Locality in BitTorrent Traffic via Biased Neighbor Selection](https://reader034.fdocuments.in/reader034/viewer/2022043019/5f3bbcdfe9eb535d6a27799b/html5/thumbnails/25.jpg)
Future Work
•
Implementation of tracker-side changes and experiments
•
Theoretical modeling of biased neighbor selection
•
Dynamic biased neighbor selection for “global congestion avoidance”