1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto,...

21
1 BitTorrent and fountai n codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grange tto, Matteo Sereno Department of Computer Science, University of Turin, Turin, I taly IEEE IPDPS(International Parallel & Distribu ted Processing Symposium) 2010
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    217
  • download

    1

Transcript of 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto,...

Page 1: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

1

BitTorrent and fountain codes:friends or foes?

Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno

Department of Computer Science, University of Turin, Turin, Italy

IEEE IPDPS(International Parallel & Distributed Processing Symposium) 2010

Page 2: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

2

Outlines

Introduction Overview of BitTorrent The modified protocol Experimental results Conclusion

Page 3: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

3

Peer to peer and file sharing applications

Peer to peer paradigm has a huge diffusion nowadays [1]

It can be employed for a lot of different applications: File sharing: BitTorrent [2][3] , eDonkey, eMule,

Limewire… Video Streaming : SopCast, PPLive, PPStream Others: Skype, Sciencenet, Spotify

BitTorrent is doubtless the reference architecture for file sharing

Page 4: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

4

BitTorrent protocol 1

BitTorrent adopts a multi-part download scheme:

The file is divided into pieces, each piece into blocks. Peers are synchronized between them at piece level. Each client knows what pieces have been completely downl

oaded from his neighbors. Peers exchange between them piece’s blocks

Page 5: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

55

BT (Basic idea)

Chop file into many pieces. piece : typically 256KB in size. (1 piece = 256KB) 1 block = 16KB

Replicate different pieces on different peers as soon as possible.

As soon as a peer has a complete piece, it can trade it with other peers.

Hopefully, we will be able to assemble the entire file at the end.

http://www.powercam.cc/slide/119

Page 6: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

66

BT (Basic components) Seed

Peer that has the entire file. Leacher

Peer that has an incomplete copy of the file. A Torrent file

Passive component. Files are typically fragmented into 256KB pieces. The torrent file lists the hashes of all the pieces to allow peer

s to verify integrity. Typically hosted on a web server.

A Tracker Active component. The tracker is responsible to help the peers find each other a

nd to keep the download/upload statistics of each peer. Returns a random list of peers.

http://www.powercam.cc/slide/119

Page 7: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

77

BT

Free-Riders phenomenon The selfish peers choose only to download the file without uploading.

Tit-for-Tat policy Each peer chooses to upload to its peer as long as it takes something in ret

urn. The Piece Selection mechanism

Peers always select to download the rarest pieces within their peer set. Rare pieces that are currently available, might not be available in the future. Peers that have these pieces might leave the network or fail. By acquiring these rare pieces before they become extinct we can increase the Q

oS. The Incentive mechanism

This mechanism in case of time sensitive data distribution is even more beneficial for the welfare of the swarm. Use the Tit-for-Tat policy to resist the Free-Riders problem. Time constrained data distribution provides stronger incentives to peers to avoid b

eing Free-Riders.

http://www.powercam.cc/slide/119

Page 8: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

8

BitTorrent protocol 2: rarest first and tit for tat

Main BitTorrent’s strategies: Tit-for-Tat: assures reciprocity between downlo

ading and uploading rates. Rarest first: assures a fair distribution of file’s pi

eces Note that only complete pieces can be shared and

distributed

Many research works claim that BitTorrent has near-optimal performance [4] [5] [6]

Page 9: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

9

Flash crowd, high churn rates

Some phenomena can cripple BitTorrent performance: Flash crowd: many peer j

oin or leave the network at the same time

High churn rates: peers join and leave the network at high rates

Many peer leave the overlay network at the same timeExample of simulated population's dynamics

in a network affected by flash crowd and high churn rates.

Page 10: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

10

Modifying BitTorrent protocol 1: Luby-transform codes

LT codes [7][8] are a class a fountain codes that use simple XOR operations to encode and decode the message. The decoding process has a certain overhead ε : the recipient needs to receive a number of packets that exceed in percentage the original size of the message by a certain amount. If k is the original number of non coded blocks, the decoding process succeeds when k(1+ ε) packets are received.

Benefits Avoid content reconciliation A peer can share partially downloaded file parts File parts can be download concurrently from different peers

Drawbacks Decoding overhead Encoder/decoder complexity

Page 11: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

11

Fountain Codes

Fountain Codes are rateless: The number of encoded packets generated can be determined on the fly.

11http://www.powercam.cc/slide/1266

Page 12: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

12

Fountain Codes

Fountain Codes are rateless:

The number of encoded packets generated can be determined on the fly.

Fountain Codes can also have fantastically small encoding and decoding c

omplexities.

Depends on the careful choice of Degree Distribution.

http://www.powercam.cc/slide/1266

Page 13: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

13

Luby Transform (LT) Codes: Encoding process:

For the ith encoded packet, select degree di by carefully chosen Degree Distribution (Robust Soliton Distribution).

Choose di source data.

Perform XOR on chosen data. Decoding process:

Decode degree-one encoded packets. Remove degree-one edges iteratively.

13

x1 x2 x3 x4 x5

y1 y2 y3 y4 y5

x1 x

3

x2

x2 x

5

x4

x6

x3 x

5 x

6LT Codes

Page 14: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

14

Modifying BitTorrent protocol 2: Rarest first on partial pieces GPS simulator

Summary of protocol modifications: Use LT codes to code file’s pieces. The file’s piece subdivision

is different in accordance with the requirements of encoding. The decoding overhead is about 10% 1 piece = 1048 blocks = 512KB 1 block = 500 Bytes

Share partial file’s piece A piece can be downloaded from more peers at same time

without content reconciliation The protocol requests first the rarest complete piece. If there

are not complete pieces available, a peer requests the rarest partial piece

If a piece is fully decoded a peer sends new coded blocks We use General purpose simulator GPS[9] simulator in

order to test our modified protocol

Page 15: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

15

Experimental results: simple three peer topology

Seeder

Leecher Leecher

A simple topology with a seeder and two leechers

Page 16: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

16

Experimental results: single flash crowd scenario

Single flash crowd scenario set up: Time 0: a flash crowd of 50 peers occurs Time 50: 20 random selected peers leave the

network, regardless of the state of the download

Page 17: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

17

Experimental results: downloading times distribution

Figure 2. Normalized distributions of the download times: on the left the modified protocol, on the right the original BitTorrent protocol

Page 18: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

18

Experimental results: a more complex scenario

Figure 3. The evolution of overlay population in a sample scenario generated with parameters a = 0.025, b = 0.05, c = 0.5, d = 0.025, e = 0.05, f = 0.5

Page 19: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

19

Experimental results: a more complex scenario

The simulated network nodes :1000•10% of 10 Mbps of bandwidth•90% of 1 Mbps of bandwidth with ADSL connections

During the simulation, multiple flash crowd and massive departure of peer occur.

Page 20: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

20

Conclusions

In this paper we proposed a novel modifications of the BitTorrent protocol by introducing the LT encoding

We proved by simulations that better performance can be achieved considering file of small size and in adverse network conditions.

Our proposed protocol yields a gain that is above the 10% in all simulated scenarios, in spite of the decoding overhead that the LT codes introduce.

Page 21: 1 BitTorrent and fountain codes: friends or foes? Salvatore Spoto, Rossano Gaeta, Marco Grangetto, Matteo Sereno Department of Computer Science, University.

21

References

[1] T. Karagiannis, A. Broido, M. Faloutsos, and K. C. Claffy, Transport layer identification of p2p traffic, in Proc. ACM IMC04, Taormina, Sicily, Italy, October 2004.

[2] http://www.bittorrent.com/ [3] Bitorrent protocol specification v1.0 http://wiki.theory.org/BitTorrentSpecification, Jun

e 2005 [4] A. Legout, G. Urvoy-Keller, P. Michiardi, Understanding bittorrent: An experimental p

erspective. Technical report, CNRS : FRE2660 EURECOM [5] A. Legout, G. Urvoy-Keller, P. Michiardi, Rarest First and Choke Algorithms Are Enou

gh, IMC ’06: Proceedings of the 6th ACM SIGCOMM conference on Internet measurement, Rio de Janeriro, Brazil, 2006.

[6] A. Al-Hamra, A. Legout, and C. Barakat, Understanding the Properties of the BitTorrent Overlay, CoRR abs/0707.1820: (2007).

[7] M. Luby, LT codes, Foundations of Computer Science, 2002. Proceedings. The 43rd Annual IEEE Symposium on (2002).

[8] E.Hyytia, T. Tirronen, J. Virtamo Optimizing the Degree Distribution of LT Codes, in RESIM 2006, 6th International Workshop on Rare Event Simulation, 2006, Bamberg, Germany

[9] W. Yang, N. Abu-Ghazaleh, GPS: A General Peer-to-Peer Simulator and its Use for Modeling BitTorrent, Proceedings of 13th Annual Meeting of the IEEE International Symposium on Modeling, Analysis, and Simulation of Computer and Telecommunication Systems (MASCOTS ’05) , Sept 27-29, 2005, Atlanta.

M. Grangetto, R. Gaeta, and M. Sereno, Rateless codes network coding for simple and efficient p2p video streaming in Proc. of IEEE International Conference on Multimedia and Expo, July 2009.