Top Banner
Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Ashwin R. Bharambe ( Carnegie Mellon Carnegie Mellon University University ) ) Cormac Herley ( Cormac Herley ( Microsoft Research, Redmond Microsoft Research, Redmond ) ) Venkat Padmanabhan ( Venkat Padmanabhan ( Microsoft Research, Microsoft Research, Redmond Redmond ) ) April 27, 2006 @ IEEE INFOCOM, Barcelona April 27, 2006 @ IEEE INFOCOM, Barcelona
20

Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

Dec 18, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

Analyzing and Improving BitTorrent

Ashwin R. Bharambe (Ashwin R. Bharambe (Carnegie Mellon UniversityCarnegie Mellon University))

Cormac Herley (Cormac Herley (Microsoft Research, RedmondMicrosoft Research, Redmond))

Venkat Padmanabhan (Venkat Padmanabhan (Microsoft Research, RedmondMicrosoft Research, Redmond))

April 27, 2006 @ IEEE INFOCOM, BarcelonaApril 27, 2006 @ IEEE INFOCOM, Barcelona

Page 2: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

2

How BitTorrent Works

Seed

Seed

1

2

5

3

4

1

3

Content Distribution ToolContent Distribution Tool

File is chopped into File is chopped into piecespieces

Page 3: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

3

How BitTorrent works

Downloaders exchange blocks with each Downloaders exchange blocks with each otherother

Utilizes perpendicular bandwidth

Tracker keeps track of connected peersTracker keeps track of connected peers

Salient featuresSalient featuresWhich block to download first? Locally rarest block

Which peers should I upload blocks to? Tit-for-tat: peers which give best download rates

Page 4: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

4

Why study BitTorrent (again) ?

Very popular, successful: empiricallyVery popular, successful: empiricallyWhat exactly makes it perform so well? Which parameter it chose is crucial?

Motivating QuestionsMotivating QuestionsAre download rates optimal? Can we do better?Is the Rarest First policy really beneficial?Does rate-based Tit-for-tat (TFT) work? Must nodes continue seeding after downloading?

Answers depend on many parameters!Answers depend on many parameters!Hard to control in measurements or analytically

Page 5: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

5

Talk Outline

1.1. Evaluation MethodologyEvaluation MethodologySimulation-based

2.2. Scalability under homogeneous settings Scalability under homogeneous settings Impact of block-choosing policy, degree, etc.

3.3. Fairness under heterogeneous settingsFairness under heterogeneous settingsImpact of Tit-for-tat

4.4. Post-flash-crowd scenario: pre-seeded nodesPost-flash-crowd scenario: pre-seeded nodes

5.5. ConclusionConclusion

Goal: Analyze and understand BitTorrentunder various scenarios

Page 6: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

6

Experimental Setup

Discrete-event simulatorDiscrete-event simulatorModels BitTorrent joins, leaves, block exchangesModels queuing delays, no propagation delayFluid model of link sharing, no TCP dynamicsAssumes bw-bottlenecks only at the edge

Common parametersCommon parameters100 MB file; 400 blocks of 256 KB1 seed always on, flash-crowd: 100 joins/secSeed-uplink = 6 Mbps, Nodes = 1500/400 kbps#nodes = 1000, #neighbors = 7

Page 7: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

7

Scalability

Questions:Questions:Does BitTorrent scale as the size of the flash crowd increases?Does it perform optimally? High uplink utilization High fairness (in the heterogeneous case)

Measurement MetricsMeasurement MetricsMean uplink utilization Mean over time, across all nodes Mean download time is directly related

Page 8: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

8

Scalability: Uplink Utilization

Upload utilization is constantly very high

Page 9: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

9

Problem Case: Slow Seed

Node capacitiesNode capacitiesUplink: 400 kbpsDownlink: 1500 kbps

Seed capacitySeed capacityUplink: varies from 200 kbps 1000 kbps

Scenario: seed uplink = 400 kbpsScenario: seed uplink = 400 kbpsIf BitTorrent is performing optimally, we should see near 100% uplink utilizatoin

Page 10: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

10

Problem Case: Slow SeedVanilla BitTorrent:

Connected nodes decidewhich blocks to request from seed

The seed node decideswhich blocks to serve

Avoid sending duplicate blocks from seed at all costs

Page 11: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

11

Neighbor Count and Block Policy

Questions:Questions:How many neighbors required to guarantee good uplink utilization?

When does Local Rarest First matter?

Page 12: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

12

Neighbor Count and Block Policy

Very low neighbor count is sub-optimal

Beyond a threshold, neighbor count does not

affect utilization

Local Rarest First policyworks better than Random

block picking

However, differences are discernible only when the

seed bandwidth is low!

Page 13: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

13

Improving Fairness

Goal: ensure nodes upload as much as they Goal: ensure nodes upload as much as they downloaddownload

ISPs have begun to charge heavy P2P usersUploaders will bear the brunt of the charges

BitTorrent’s BitTorrent’s rate-basedrate-based TFT and optimistic TFT and optimistic unchoke can result in high unfairnessunchoke can result in high unfairness

Proposed solution: pair-wise block-based TFTProposed solution: pair-wise block-based TFTBound the difference between blocks uploaded and downloaded

Page 14: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

14

Improving Fairness

Questions:Questions:In the worst case, how many blocks does a node serve? Measure as ratio to #blocks downloaded

What is the overall uplink utilization? TFT advocates blocking a link even when there is

data to send Can hurt link utilization

Page 15: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

15

Improving Fairness: Blocks served

Vanilla BitTorrent results in high unfairness

Block-level TFT effective

Matching Tracker useful

Page 16: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

16

Improving Fairness: Uplink Utilization

Matching Tracker helpsincrease utilization

Pairwise TFT needs higher node degreesfor better utilization

Page 17: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

17

Other Workloads: Pre-seeded Nodes

ScenarioScenarioSome nodes join a flash crowdPartially finish the downloadRe-join a flash crowd later

Question:Question:Other nodes start afresh; hence not so choosy These nodes are looking for specific blocks Do they require more time to finish?

Page 18: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

18

Pre-seeded nodes: Download Time

LRF “equalizes” rate of block “flow” pre-seeded

nodes takes longer

Small amount of FEC improves performance

significantly!

Page 19: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

19

Conclusion

Focus: upload utilization and (un)fairness Focus: upload utilization and (un)fairness

FindingsFindingsBitTorrent scales well Local Rarest First eliminates last-block problem Design decisions crucial when seed uplink is slow

Rate-based TFT can result in unfairness in heterogeneous settings Block-based TFT can alleviate it

LRF may be sub-optimal if nodes have differing objectives Source-based FEC sometimes useful

Page 20: Analyzing and Improving BitTorrent Ashwin R. Bharambe ( Carnegie Mellon University ) Cormac Herley ( Microsoft Research, Redmond ) Venkat Padmanabhan (

20

Thank You!

Find simulator-code (C#) at:http://research.microsoft.com/projects/btsim

Questions?Questions?