Improving BitTorrent - PowerPoint PPT Presentation

About This Presentation
Title:

Improving BitTorrent

Description:

PlanetLab & Real Torrent. Exploits: Download only from seeds. Median ... In 25% of the torrents the local peer is not interested. Who is interested in me? ... – PowerPoint PPT presentation

Number of Views:132
Avg rating:3.0/5.0
Slides: 29
Provided by: dimitridef
Category:

less

Transcript and Presenter's Notes

Title: Improving BitTorrent


1
ImprovingBitTorrent
  • Designing a new BitTorrent Client

2
Overview
  • How BitTorrent Works
  • Experimental Analyses
  • Modeling Gittins Indices
  • Our New Algorithms
  • Proposed Evaluation
  • HELP!

3
File Organization
File
4
2
3
1
Piece256KB
Block16KB
Incomplete Piece
4
Initialization
webserver
user

5
On the Wire Protocol
  • (Over TCP)

Non-keepalive messages
0 choke 1 unchoke 2 interested 3 not
interested 4 have 5 bitfield 6 request 7
piece 8 cancel
ID/Infohash Handshake
BitField
BitField
Local Peer
Remote Peer
Interested 0choked 1
Interested 0choked 1
6
Piece Selection
  • Pipelining (5 requests)
  • Strict Priority
  • 3 stages
  • Random first piece
  • Rarest First
  • Endgame mode

7
Peer Selection
  • Focus on Rate
  • Upload to at most 4 peers
  • Random Unchoke
  • Global rate cap only

8
Analyses
  • N. Liogkas et al., Exploiting BitTorrent For Fun
    (But Not Profit), IPTPS 2006.
  • A. Legout et al., Rarest First and Choke
    Algorithms Are Enough, June 2006
  • A. R. Bharambe et al. Analyzing and Improving
    BitTorrent Performance, Feb 2005.

9
Exploitation Liogkas et al.
  • PlanetLab Real Torrent
  • Exploits
  • Download only from seeds
  • Median improvement of 7-20
  • Download only from fastest peers
  • Contradictory results
  • good in PlanetLab (22)
  • bad in the wild(-1 to -30)
  • Advertise false pieces
  • 22 better download rates

10
Piece Selection Legout et al.
11
Piece Selection Legout et al.
a local peer interested in remote
peer b time peers are connected c
remote peer interested in local peer
12
Piece Selection Legout et al.
  • Limitations
  • In 25 of the torrents the local peer is not
    interested.
  • Who is interested in me?

13
Gittins Indices
  • The Two-armed bandit problem
  • Same prize
  • Unknown winning probabilities
  • Known discount factor
  • Limitation
  • Infinitely discounted or fixed horizon
  • Projects remain dormant
  • One project at a time
  • P. Whittle 1988
  • Restless bandits
  • m projects on average
  • Asymptotically optimal for large m and n

14
Piece Selection
  • Key ideas
  • We dont care about piece selection
  • Keep download pipes full
  • Peer Queues
  • Assume
  • We receive pieces at a rate of 1 per second

15
Piece Selection

Local Peer
Remote Peer
16
Piece Selection
Q1
Peer 1
Q2
Remote Peer
Local Peer
Peer 2
Q3
Peer 3
17
Piece Selection
  • Cost of empty queue Ci per unit time
  • Discount factor d lt1
  • Piece consumption rate li (Poison Process)
  • Queue has length li(t)

18
Piece Selection
  • Minimize
  • where

We can Solve this with Gittins Indices!
19
Piece Selection Algorithm(alpha version)
  • Calculate Gittins Index for each queue
  • Feed the queue with the highest index.
  • Two Problems
  • 1 piece goes into many queues
  • it takes a while to get the pieces

20
Piece Selection Algorithm(beta version)
  • Calculate Gittins Index for each queue
  • Calculate Gittins index for each piece.
  • n(piece) SA
  • Get piece with highest index possible.

21
Piece Selection Algorithm
highest index
Peer 1
Peer 2
lowest index
Peer 3
time
22
Piece Selection Algorithm(Final Release)
  • Calculate Gittins Index for each queue.
  • Calculate Gittins index for each piece.
  • Extrapolate piece download finishing time.
  • Order finishing times (earliest first).
  • Order pieces (highest index first).
  • Match best piece with earliest finishing time.

23
Peer Selection
  • Key Ideas
  • upload rate is a perishable good
  • Throttle each connection individually
  • Do not limit number of downloaders to 4

24
Peer Selection Our Model
  • Series of rounds
  • Edownload rate f(upload rate)
  • Estimate download rates with have.

25
Peer Selection Algorithm
  • Keep clients with best ratios.
  • Throttle to estimated safe bound.
  • Solve Knapsack problem
  • Total upload bandwidth max weight
  • Item value download rate we are getting
  • Item weight estimated upload bound
  • If download/upload rate ratio is lt 1
  • Random unchoke

26
Evaluation
  • Simultaneously
  • Identical machines and network.
  • Repeat experiment and swap clients.
  • Different torrents

vs.
27
HELP!
  • What we need
  • An awesome python programmer 0)
  • Whats in it for you
  • We are cool! 0)
  • Publications
  • Open Source Real Estate

28
  • Thank you!
  • defigued_at_cs.ucdavis.edu
Write a Comment
User Comments (0)
About PowerShow.com