Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park,...

58
Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos Michael Sirivianos , Jong Han Park, Rex Chen , Jong Han Park, Rex Chen and and Xiaowei Yang Xiaowei Yang University of California, Irvine University of California, Irvine Feb 26, 2007 @ IPTPS Feb 26, 2007 @ IPTPS

Transcript of Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park,...

Page 1: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in BitTorrent Networks with the Large View

Exploit

Michael SirivianosMichael Sirivianos, Jong Han Park, Rex Chen and , Jong Han Park, Rex Chen and

Xiaowei YangXiaowei Yang

University of California, IrvineUniversity of California, Irvine

Feb 26, 2007 @ IPTPSFeb 26, 2007 @ IPTPS

Page 2: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Why free-ride in BitTorrent?

Very successful P2P content distribution system

Built-in incentives for clients to upload positively correlates a client’s download and upload

rates

BitTorrent users may still choose to free-ride

If they can download as fast as protocol compliant clients

Slow uplink, quota on outgoing traffic, less risk of legal action

Internet

Can’t even browse!

Upload at 10KB/sec1.5Mbps/ 128Kbps

ADSL

Page 3: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Our contributions

Free-ride while maintaining high download rates

Identify an effective free-riding exploit for BitTorrent

Implement exploit in Enhanced CTorrent

Experimental evaluation Public swarms ~300-leecher PlanetLab swarms

Page 4: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Outline

Motivation and contribution

BitTorrent overview

The exploit

Experimental evaluation

Related work

Conclusion and Future work

Page 5: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

BitTorrent overview

File is divided into chunks (e.g. 256KB) Seeders have all chunks of the file Leechers have some or no chunks of the file

Leecher A

Leecher B

Leecher CSeeder

Tracker1 2 3

Page 6: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

BitTorrent overview

Clients (seeders or leechers) contact the tracker Tracker has complete view of the swarm

Leecher A

Leecher B

Leecher CSeeder

Tracker

ViewSeeder

Leecher A

Leecher B

Leecher C

Page 7: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

BitTorrent overview

Leecher A

Leecher B

Leecher CSeeder

Tracker

Partial View

Seeder

Leecher B

ViewSeeder

Leecher A

Leecher B

Leecher C

Tracker sends partial view to clients Clients connect to peers in their partial view

Page 8: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

BitTorrent overview

Every 10 sec, seeders sample their peers’ download rates Seeders unchoke 4-10 interested fastest downloaders

Leecher A

Leecher B

Seeder

Tracker

Leecher C

1 2 3

Page 9: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

BitTorrent overview

Clients announce available chunks to their peers Leechers request chunks from their peers (locally rarest-first)

Leecher A

Leecher B

Seeder

Tracker

1

2

Leecher C

3

Page 10: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

BitTorrent overview

Leecher A

Leecher B

Seeder

Tracker

1

Leecher C

Rate-based tit-for-tat

Every 30 sec, leechers optimistically unchokes 1-2 peers

Page 11: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

BitTorrent overview

Leecher A

Leecher B

Seeder

Tracker

1

Leecher C

Rate-based tit-for-tat

Every 30 sec, leechers optimistically unchoke 1-2 peers

Every 10 sec, leechers sample their peers’ upload rates

Page 12: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

BitTorrent overview

Leecher A

Leecher B

Seeder

Tracker

3 2

Leecher C

Rate-based tit-for-tat

Every 30 sec, client optimistically unchokes 1-2 peers

Every 10 sec, seeder samples its peers’ upload rates

Leecher unchokes 4-10 fastest interested uploaders

Page 13: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Outline

Motivation and contribution

BitTorrent overview

The exploit

Experimental evaluation

Related work

Conclusion and future work

Page 14: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Large view exploit

Observations Seeders do not consider whether leechers upload

to others

Optimistic unchoking is generous (10 sec)

Modify client to exploit altruism Connect from and disconnect to tracker every 15

sec

Repeatedly request and obtain a partial view

Connect to all clients in the combined large view

It is more likely to connect to seeders

It is more likely to be optimistically unchoked by leechers

Page 15: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Outline

Motivation and contribution

BitTorrent overview

The exploit

Experimental evaluation

Related work

Conclusion and future work

Page 16: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Experimental evaluation

Evaluation goals: Determine effectiveness of the large view exploit

Determine behavior of swarms as % free-riders increases

Performance metric

File download completion time

Page 17: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in public swarms

Methodology CTorrent free-rider and compliant (unmodified)

leecher

Compliant leecher connects to at most 50 peers

Leechers download ~500MB-2GB files in ~50-650 client swarms

Leechers run on two identical machines and in the same LAN

Neither leecher is rate-limited

Leechers simultaneously join the swarm

Page 18: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in public swarms

In 12/15 swarms, free-rider does better than compliant client

Swarm

#seeders

#leechers

13 9 64

14 91 392

Page 19: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in public swarms

Swarm

#seeders

#leechers

13 9 64

14 91 392

In 12/15 swarms, free-rider does better than compliant client

Page 20: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in public swarms

Swarm

#seeders

#leechers

13 9 64

14 91 392

In 12/15 swarms, free-rider does better than compliant client

Page 21: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Methodology BNBT Easy tracker, and CTorrent clients

Clients download a 12MB file

~300 leechers rate-limited at 30KB/sec

1 initial seeder rate-limited at 120KB/sec

Leechers remain online after download completion

Compliant leechers connect to at most 50 peers

Results collected over 10 runs

Free-riding in PlanetLab-residing swarms

Page 22: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in PlanetLab-residing swarms

Page 23: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in PlanetLab-residing swarms

Experiment 1: 100% compliant clients

Page 24: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in PlanetLab-residing swarms

Experiment 1: 100% compliant clients Experiment 2: 10% free-riders that connect to 50 peers only

Page 25: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in PlanetLab-residing swarms

Experiment 1: 100% compliant clients Experiment 2: 10% free-riders that connect to 50 peers only 10% free-riders do much worse than 90% compliant

Page 26: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in PlanetLab-residing swarms

Experiment 1: 100% compliant clients Experiment 2: 10% free-riders that connect to 50 peers only 10% free-riders do much worse than 90% compliant

Page 27: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in PlanetLab-residing swarms

Page 28: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in PlanetLab-residing swarms

Experiment 1: 100% compliant clients

Page 29: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in PlanetLab-residing swarms

Experiment 1: 100% compliant clients Experiment 2: 10% free-riders that employ large view exploit

Page 30: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in PlanetLab-residing swarms

Experiment 1: 100% compliant clients Experiment 2: 10% free-riders that employ large view exploit 10% free-riders do slightly better than 90% compliant

Page 31: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in PlanetLab-residing swarms

Experiment 1: 100% compliant clients Experiment 2: 10% free-riders that employ large view exploit 10% free-riders do slightly better than 90% compliant

Page 32: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in PlanetLab-residing swarms

Experiment 1: 100% compliant clients Experiment 2: 10% free-riders that employ large view exploit 10% free-riders do slightly better than 90% compliant 10% free-riders do slightly worse than 100% compliant

Page 33: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in PlanetLab-residing swarms

Experiment 1: 100% compliant clients Experiment 2: 10% free-riders that employ large view exploit 10% free-riders do slightly better than 90% compliant 10% free-riders do slightly worse than 100% compliant

Page 34: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Free-riding in PlanetLab-residing swarms

Page 35: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

60% free-riders do worse than 40% compliant

Free-riding in PlanetLab-residing swarms

Page 36: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

60% free-riders do worse than 40% compliant

Free-riding in PlanetLab-residing swarms

Page 37: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

60% free-riders do worse than 40% compliant 60% free-riders do much worse than 100% compliant

Free-riding in PlanetLab-residing swarms

Page 38: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

60% free-riders do worse than 40% compliant 60% free-riders do much worse than 100% compliant

Free-riding in PlanetLab-residing swarms

Page 39: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

60% free-riders do worse than 40% compliant 60% free-riders do much worse than 100% compliant Free-riders are compelled to start uploading

Free-riding in PlanetLab-residing swarms

Page 40: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Outline

Motivation and contribution

BitTorrent overview

The exploit

Experimental evaluation

Related work

Conclusion and future work

Page 41: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Related Work

BitThief (HotNets ‘06) Large view is central technique

Random chunk scheduling instead of locally rarest-first

We evaluate exploit in medium scale PlanetLab swarms

BitTyrant (NSDI ‘07) Connects to many peers too

Does not free-ride

Strategically selects per peer upload rates

Page 42: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Outline

Motivation and contribution

BitTorrent overview

The exploit

Experimental evaluation

Related work

Conclusion and future work

Page 43: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Conclusion

The large view exploit is effective A free-rider can achieve better or slightly worse download rates

than protocol compliant clients

Selfish (rational) users may opt to free-ride

Good download rates without utilizing uplink

However, bad download rates when many free-riders in swarm

Page 44: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Future work – Is the exploit dangerous?

Can the exploit lead to ``tragedy of the commons” ?

Until free-riders realize they obtain bad download rates

What if cooperative clients employ large view too?

Not as altruistic (?) Clients discover fastest peers and neglect slow ones

Higher chunk announcement message overhead More informed rarest-first chunk scheduling All clients get optimistically unchoked equally as often

Page 45: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Thank You!

Technical report, source code and testbed scripts available at: www.ics.uci.edu/~msirivia/large-view

Questions?Questions?

Page 46: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Why free-ride?

4 users sharing very slow uplink

1.5Mbps/128KbpsADSL

Can’t even browse!Upload at 10KB/sec

Other reasons to not upload Access provider imposes quotas on outgoing traffic

Reduce risk of legal action for unauthorized content distr.

Page 47: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Why free-ride?

Depends on user’s utility function Goal may not be to maximize download rate

Goal may be to achieve a certain download rate,

while minimizing uplink utilization

Utility Download rate

Upload rate

0

Download rate of compliant clients

Diminishing returns

Download rate

Utility

Bad browsing experience

Page 48: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Future work - Address the exploit

View-limiting Tracker registers each client’s partial view

Client is identified by IP

Client has only N active peers in registered view

But, view can be obtained from peers too Peer Exchange, Trackerless BitTorrent

Connection verification Client A accepts connection from B

A queries tracker whether B has A in its registered view

If B does not have A in its registered view, A disconnects from B

Page 49: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Public Torrent Composition

Page 50: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Why free-ride?

Utility Download rate

Upload rate

0

Download rate of compliant clients

Diminishing returns

Download rate

Utility

Bad browsing experience

Page 51: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Can whitewashing help free-riders?

CTorrent favors for optimistic unchoking Leechers with no chunks

Leechers that have not been recently unchoked

Official BitTorrent selects leechers at random

Azureus favors leechers with less byte trade deficit

CTorrent modification to whitewash leechers

Disconnect from and reconnect to leecher after being choked

Suppress chunk announcements

Page 52: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

5% free-riders that don’t whitewash do almost as good as

5% free-riders that whitewash

Whitewashing does not help free-riders

Page 53: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Whitewashing does not help free-riders

5% free-riders that don’t whitewash do almost as good as

5% free-riders that whitewash

Page 54: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Whitewashing does not help free-riders

5% free-riders that don’t whitewash do almost as good as

5% free-riders that whitewash CTorrent’s optimistic unchoking selection is more random

than intended

Page 55: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

Whitewashing does not speed up downloading

10% free-riders still do slightly better than 90% compliant 1% free-riders that whitewash complete in ~650 sec 1% free-riders that don’t whitewash complete in ~640 sec

Page 56: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

CTorrent Unchoking

Every 10 secs gets the fastest n downloaders. It unchokes them, while it chokes all others, the non-interested and the slowest.

Every 30 secs, it selects the n-1 fastest downloaders and one peer that is not the fastest. It checks each interested peer one by one. The slowest uploader among the so far collected n-1 fastest peers and the new peer is replaced with the so far selected to be optimistically unchoked as follows:

If slowest has no data, slowest is selected to be opt unchoked with 75% prob and the so far selected to be opt unchoked peer is selected with 25%. Otherwise, if slowest is choked and so far opt unchoked client is not, or if both are choked but slowest waited longer, or if both are unchoked but slowest had less time unchoked, slowest is selected as follows: slowest is selected if it has no data, or if so far opt unchoked has data, or with 25% prob. If none of the above applies the so far opt unchoked remains unchoked.

Whitewashing harms performance in general because it interferes with clustering of compliant peers. But it does not improve performance for FRs.

Page 57: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

BitTorrent View Re-request Official BT client by default allows 80 connections. The BT code says that if the client accepts incoming connections it only requests view aggressively if clients are less than minpeers/3.

if self.last_time > bttime() - self.config['rerequest_interval']:

return

if self.ever_got_incoming():

getmore = self.howmany() <= self.config['min_peers'] / 3

else:

getmore = self.howmany() < self.config['min_peers']

if getmore or bttime() - self.last_time > self.announce_interval:

self._announce()

by default, minimum 300 sec between requesting view, rerequest_interval = 300 sec, self.announce_interval = 3600

Page 58: Free-riding in BitTorrent Networks with the Large View Exploit Michael Sirivianos, Jong Han Park, Rex Chen and Xiaowei Yang University of California, Irvine.

BitTorrent modelled as IPD

Tit-for-Tat Cooperate at first round

Do what the other player did in previous round

Tit-for-Tat is winning strategy When players do not know number of rounds

Tit-for-Tat not the best strategy When players know how many rounds will play

Can play with many players

Best strategy may be to defect after first round

Obtain large portion of content without cooperating

GET RID OF IT?