Upload
june-pope
View
215
Download
0
Embed Size (px)
Citation preview
1
Incentives Build Robustness in BitTorrent?
2
Agenda
• Introduction• BitTorrent Basics• Bit Tyrant: A strategic client• Bit Thief: A free-riding client• Other Tricks of BT Client• Real World Experiments• Avoiding of Tricks• Conclusion
3
Introduction
• BitTorrent core incentive– Upload More, Download More
• Problem Definition– I am a selfish user– Can I gain without pay / pay less?
4
BitTorrent Basics
• Step 0 – Publishing Content– Create Torrent file
• Tracker URL• SHA-1 Hash Checksum
– Assign a Tracker– Distribute Torrent to users through Web
Site, Newsgroup or Forum
5
BitTorrent Basics
• Step 1 – Joining– Peers get the Torrent– Connect to Tracker
• Look for available peers• DHT (Distributed Hash Table)
– Create connection with other peers– Start with Others’ Optimistic Unchoking
• Look for better peers• Let other peers join the swarm
6
BitTorrent Basics
• Step 2 to N-1 – Pipelining– Exchange bitmap about which chunks
are available– Pay more, get more
• To build incentive for peers to upload• Reciprocal
– Rarest first• To preserve File completeness among the
swarm• To build up peer’s reputation
7
BitTorrent Basics
• Choking– Send data to only few good peers
• Contribute data to you• Have pieces that you wants• A resourceful peers
– It will be nice if I can pay minimal cost to be un-choke!!!!
8
BitTorrent Basics
• Optimistic Un-choking– Allow new peers to get some pieces for
exchange– Allow discovery of better exchanging
partners– Most peers are so friendly
– I can gain without contribute!!!!
9
BitTorrent Basics
• Ending Phase– Toward the end of download– Request for missing pieces– Search for available peers– 20-30 pieces left
10
Bit Tyrant: A strategic client
• Incentive– 100KB/s 15KB/s
• 1% drop
– 15KB/s 10KB/s• 40% drop
– About 1.9Mbps World Wide Bandwidth• http://arstechnica.com/news.ars/post/
20070529-survey-average-broadband-speed-in-us-is-1-9mbps.html
– Why do I still need to give u so much?
11
Bit Tyrant: A strategic client
• Resource Management– Bandwidth fixed– # Conn x Speed = Constant
• Current Official BT Protocol (<=5.0)– 4 un-choking peers– 1 optimistic un-choking
• A Optimization Problem!!
12
Bit Tyrant: A strategic client
• Bit Tyrant Un-chocking algorithm– Mark Dp be download rate of conn p– Mark Up be upload rate of conn p– For each round
• Calculate performance metric Dp / Up• Un-choking the conn with the highest metric
– At the end of each round• If peer doesn’t un-choking us Up (1+delta)Up• If peer un-choking us Dp = downlod rate• If peer has un-choked us for r round Up (1-lamda)Up
13
Bit Tyrant: A strategic client
• Very simple algorithm
• Net Effect– Select friendly peers– Filter out unfriendly peers– Gain from peers most of the time
14
Bit Tyrant: A strategic client
• Dynamic sizing of active set– Serving the best peers first– The 2nd best next and so on – Until upload rate is exhausted
• Local Optimal trading– Not global, because only concern your
local peers group
15
BitThief : A free-riding client
• Download only– No copy right issue (Only Contributor is
sued)– Conserve Resource– Use to spoil the community
• Basic Idea– Gain from optimistic un-choking– Gain from free sharing of Seeder
16
BitThief : A free-riding client
• Gain From Optimistic Un-choking– Request for as many clients as possible
• May be block by the Tracker• SIMD like query to Tracker
– Connect to all client available • Higher Chance of being un-choking
– Always pretend to be a new comer• A bitmap with no available piece• Try to download whatever available• Most Clients are so nice
17
BitThief : A free-riding client
• Gain From Free Sharing of Seeder– Seeder select peers in two ways
• The Highest Bandwidth (from tracker)• Round Robin
– Bit Thief report high upload rate– # of Seeder > # of Leecher Even bette
r• Gain from both methodology
18
Other Tricks of BT Client
• Client Discrimination– Higher priority for Si
milar Client– Delibrately choke ot
her client
• Pretend to be Local Neighbor– Fake tracker with wr
ong upload rate– Retrieve from Seed
• Rapid Disconnect and Reconnect– Hope to gain from o
ptimistic unchoking– Remove from black-l
ist
• Multiple Connection to the same client– For high speed BB– Gain the most from t
he same client
19
Experiment with BT Client
• Testing Environment– Athlon 64 2800+– 1GB Ram– 120GB 7200 rpm HDD– Windows XP SP2 w/ TCP Conn Crack– BT Software
• Utorrent / Mainline• Bit Comet• Bit Tryant
– iCable internet Connection
20
Experiment with BT Client
• Gentoo AMD 64 Minimal ISO – 54.4MB– 34 Seeders, 0 Leechers
• Ubuntu 7.10 i386 Desktop ISO– 695MB– 928 Seeders / 78 Leechers
• NBA Match– 921MB– 120 Seeders, 714 Leechers
21
Experiment with BT Client
Gentoo Upload TimeAvg Speed
KB/s
Conn Peer
Seed/Leech
Bit Comet 0 18:40 50.65 10/0
uTorrent 0 17:01 55.62 12/0
Bit Tyrant 0 15:04 62.75 16/0
22
Experiment with BT Client
Ubuntu Upload TimeAvg Speed
KB/s
Conn Peer
Seed/Leech
Bit Comet 32MB 15:20 773.57 75/70
uTorrent 112KB 69:13 171.37 36/1
Bit Tyrant 100KB 26:28 448.16 40/1
23
Experiment with BT Client
NBA Upload TimeAvg Speed
KB/s
Conn Peer
Seed/Leech
Bit Comet 1070MB 52:32 299 11/53
uTorrent 1035MB 1:42:50 152 7/29
Bit Tyrant 540MB 1:20:10 196 10/22
24
Experiment with BT Client
• Bit Thief – Achieve a high download rate (~150KB/s) for Ub
untu and NBA– Suck at 25%
25
Avoiding Tricks
• Target– Stop Fake Information– Identify Free-riding
• Difficulties– Bit Torrent is so wide spread– Too many implementations
• Incentive driven works again!!!– Co-operative identify bad client– Block bad peers, Share with good peers
26
Avoiding Tricks
• Sharing with Peers– Search for local optimal best peers– Search for potential bad peers– Broadcast of bad peers (In a majority
basics)– It will fail if more than half of clients are
in-honest
27
Conclusion
• BT Robustness– Most peers are friendly
• Ways to Crack– Gain from cracking the protocol– Bit Tyrant: Download > Upload– Bit Thief: Free Riding
• Proposed Solution– Decentralized Client Solution
28
Reference
• Incentives Build Robustness in BitTorrent http://www.bittorrent.org/bittorrentecon.pdf
• Do incentives build robustness in BitTorrent? http://www.cs.washington.edu/homes/piatek/papers/BitTyrant.pdf
• Free Riding in BitTorrent is Cheap http://dcg.ethz.ch/publications/hotnets06.pdf