SlideShare a Scribd company logo
1 of 24
Download to read offline
CSC523: Analysis of the P2P BitTorrent Protocol                       Abram Hindle




                    CSC523: Analysis of the P2P BitTorrent Protocol

                                         Abram Hindle

                                            CSC523

                                     University Of Victoria

                                    abez@cs.uvic.ca

                                         April 22, 2004




CSC523                                                                          1
CSC523: Analysis of the P2P BitTorrent Protocol                 Abram Hindle




        This Presentation
         • What am I going to cover?
            – Introduction to BitTorrent

            – Explanation of BitTorrent Protocol

            – Literature Review

            – Block Distribution

            – Game Theory , Prisoners Dilemma and Tit For Tat

            – Byzantine Generals Problem

            – Hashing

            – Empirical Study

            – Summary




CSC523                                                                    2
CSC523: Analysis of the P2P BitTorrent Protocol                                           Abram Hindle



        Introduction
         • Terminology
            – P2P - Peer To Peer. Suggests multiple clients producing a mini-network.

            – Seeding - serving a file for download.

            – Leech - A client who is downloading from the seeders

            – Leeching - to download without contributing

            – Chunk - a piece of a file typically 64 KB to 256 KB in size.

            – Torrent - A file which provides a URL to the tracker as well contains a list of
               SHA1 hashes for the data being transfered. This is so that the hashes in the
               Torrent can be used to verify if the blocks received are valid or not.

            – Tracker - A middleman who informs the peers of all the other peers in the
               network.

            – Peer - A client to the network dedicated to a torrent.



CSC523                                                                                              3
CSC523: Analysis of the P2P BitTorrent Protocol                                         Abram Hindle




            – Seeder - A Peer who has all the blocks in a torrent.

            – Choked - A connection is choked if not file data is passed through it. Control
               data may flow but the transmission of actual blocks will not.

            – Interest - indicates whether a peer has blocks which other peers want.

            – Snubbed - A peer acting poorly - not uploading - or sending bad control
               messages, usually disconnected or ignored.




CSC523                                                                                            4
CSC523: Analysis of the P2P BitTorrent Protocol                                       Abram Hindle




        Introduction
         • What is BitTorrent [Coh01b]?
            – File Transfer Protocol

            – P2P

            – Leeches upload chunks to other leeches

            – Leeches relieve some of the load of distributing chunks from the seeders.




CSC523                                                                                          5
CSC523: Analysis of the P2P BitTorrent Protocol                     Abram Hindle




        Introduction
         • What isn’t BitTorrent?
            – Kazaa / Napster / Gnutella / etc..

            – Doesn’t provide a search mechanism

            – No chat, search, browsing, repositories

            – Essentially BitTorrent is just for downloading files




CSC523                                                                        6
CSC523: Analysis of the P2P BitTorrent Protocol                             Abram Hindle



        Introduction
         • Why use BitTorrent.




                      –

                       Figure 1: A Classical Distribution Scheme [Coh01a]



CSC523                                                                                7
CSC523: Analysis of the P2P BitTorrent Protocol                              Abram Hindle



        Introduction
         • Why use BitTorrent.




                      –

                       Figure 2: A BitTorrent Distribution Scheme [Coh01a]



CSC523                                                                                 8
CSC523: Analysis of the P2P BitTorrent Protocol                                         Abram Hindle




        Introduction
         • Why use BitTorrent.
            – You want to share one group of files with people

            – You don’t want to spend n*filesize bytes in bandwidth

            – You only want to share your file with a small community (e.g. not Kazaa)

            – Cross platform

            – Open protocol, anyone can implement a client




CSC523                                                                                            9
CSC523: Analysis of the P2P BitTorrent Protocol                                        Abram Hindle




        Introduction
         • Who uses BitTorrent?
            – iD Software, to distribute Wolfenstien Enemy Territory

            – Redhat, to distribute CD iso images.

            – Pirates, to distribute big files such as music, movies, ebooks, tv and games.

            – Music Bootleggers, to distribute high quality live concert recordings.




CSC523                                                                                          10
CSC523: Analysis of the P2P BitTorrent Protocol                                             Abram Hindle




        BitTorrent Usage
         • A Usual BitTorrent Configuration:
            – Tracker - administers the torrent, tracks historical data

            – Torrent - the File which contains a link to the tracker and hashes of each
               chunk of the distribution.

            – Seeder - the initial client who provides the file that is torrented.

            – The leech finds the torrent, the torrent points to a tracker. Then the leech
               receives a list of peers from the tracker.




CSC523                                                                                               11
CSC523: Analysis of the P2P BitTorrent Protocol                                               Abram Hindle




        BitTorrent Algorithm
         • Seeders
            – Seeders release the rarest blocks first in random order.

            – Random order maintains a uniform distribution of blocks among peers.

            – A client that is good at distributing blocks will get more attention from the
               seeder. [Azu]

            – Seeder offloads work to the peers.




CSC523                                                                                                 12
CSC523: Analysis of the P2P BitTorrent Protocol                                            Abram Hindle




        BitTorrent Algorithm
         • Leeches and Peers
            – Chunks of files are traded.

            – Chunks are verified by hashes in the torrent.

            – Tit For Tat Algorithm.
              ∗ Those clients who upload the fastest to other clients get faster download
                 rates from those clients. Some determination is to do with how much the
                 client shares.

            – BitTorrent is for file distribution, not ensuring 1 to 1 upload to download ratios.

            – Assumption is about single clients not about groups of clients.




CSC523                                                                                              13
CSC523: Analysis of the P2P BitTorrent Protocol                                       Abram Hindle



        Literature Review
         • “Analyzing peer-to-peer traffic across large networks” by Sen and Wang [SW02]
         • “A Framework for the simulation of Agents with Emotions”, [BB01] by Bazzan
            and Bordini

         • “Emotional Pathfinding”, [TDL04] by Donaldson, Park and Lin
         • “A Framework for the simulation of Agents with Emotions”, [BB01]
         • “Notions of reputation in multi-agents systems: a review”, by Mui, Mohtashemi,
            and Halberstadt [MMH02]

         • “Towards a Pareto-optimal solution in general-sum games”, by Sen, Airiau and
            Mukherjee [SAM03]

         • “The Byzantine Generals Problem” [LSP82] by Lamport, Shostak and Pease
         • “Scalable Byzantine Agreement” [LS04] by Lewis and Saia


CSC523                                                                                         14
CSC523: Analysis of the P2P BitTorrent Protocol                                      Abram Hindle




         • “FARSITE: Federated, Available and Reliable Storage for an Incompletely
            Trusted Environment” , by many authors at Microsoft Research [ABC+ 02]




CSC523                                                                                        15
CSC523: Analysis of the P2P BitTorrent Protocol                  Abram Hindle




        Block Distribution
         • How are block initially and then later distributed.
            – Random Block First and Reasoning

            – Rarest Block First.

            – Results from Model
              ∗ E[X] = m + 2(m − m/n)ln(m − m/n) + c.




CSC523                                                                    16
CSC523: Analysis of the P2P BitTorrent Protocol           Abram Hindle




        Game Theory
         • How is Game Theory Involved with BitTorrent?
            – Pareto Efficiency

            – Tit For Tat




CSC523                                                             17
CSC523: Analysis of the P2P BitTorrent Protocol   Abram Hindle




        Other Problems
         • Other problems consisted of
            – Byzantine Generals Problem

            – Hashing (SHA1)




CSC523                                                     18
CSC523: Analysis of the P2P BitTorrent Protocol                     Abram Hindle




        Empirical Study
         • What did it consist of?
            – 5 Computers + Network

            – Software, Process Communication and synchronization

            – Modifying the BitTorrent client.

            – Test Bed scripts




CSC523                                                                       19
CSC523: Analysis of the P2P BitTorrent Protocol                                       Abram Hindle




        Conclusions
         • BitTorrent is very interesting as it’s problem domain crosses many fields
            – Game Theory
              ∗ Tit For Tat algorithm works well to promote fairness.
            – Computer Networks and Reliability
              ∗ Block Distribution
            – Security
              ∗ Byzantine Generals Problem




CSC523                                                                                         20
CSC523: Analysis of the P2P BitTorrent Protocol                                        Abram Hindle




        Future Work
         • To do:
            – Investigate the effectiveness of multiple clients on one machine versus one
               client using the same amount of upstream bandwidth.

            – Investigate the effects of never admitting you have any blocks.

            – Investigate the effects of externally limiting upstream bandwidth.

            – Dedicate bandwidth to the experiment such that the total network bandwidth
               does not alter the results.




CSC523                                                                                          21
CSC523: Analysis of the P2P BitTorrent Protocol                                          Abram Hindle



        References

        [ABC+ 02] A. Adya, W. Bolosky, M. Castro, R. Chaiken, G. Cermak, J. Douceur,
                   J. Howell, J. Lorch, M. Theimer, and R. Wattenhofer. Farsite: Federated,
                   available, and reliable storage for an incompletely trusted environment,
                   2002.

        [Azu]      Azureus. Azureus java bittorrent client details.
                   http://azureus.sourceforge.net/details.php.

        [BB01]     Ana L. C. Bazzan and Rafael H. Bordini. A framework for the simulation
                   of agents with emotions. In Proceedings of the fifth international
                   conference on Autonomous agents, pages 292–299. ACM Press, 2001.

        [Coh01a] Bram Cohen. Bittorrent: Introduction. 2001.
                   http://www.bitconjurer.org/BitTorrent/introduction.html.

        [Coh01b] Bram Cohen. The offical bittorrent homepage. 2001.



CSC523                                                                                            22
CSC523: Analysis of the P2P BitTorrent Protocol                                             Abram Hindle


                   http://bitconjurer.org/BitTorrent/.

        [Coh03]    Bram Cohen. Incentives build robustness in bittorrent. May 2003.

        [LS04]     Clifford Scott Lewis and Jared Saia. Scalable byzantine agreement,
                   2004.

        [LSP82]    Leslie Lamport, Robert Shostak, and Marshall Pease. The byzantine
                   generals problem. ACM Trans. Program. Lang. Syst., 4(3):382–401,
                   1982.

        [MMH02] Lik Mui, Mojdeh Mohtashemi, and Ari Halberstadt. Notions of reputation
                   in multi-agents systems: a review. In Proceedings of the first
                   international joint conference on Autonomous agents and multiagent
                   systems, pages 280–287. ACM Press, 2002.

        [MU03]     Michael Mitzenmacher and Eli Upfal. Probabilistic Analysis and
                   Randomized Algorithms: A First Course. Brown University, 2003.

        [par04]    Pareto efficiency. 2004. http://en.wikipedia.org/wiki/Pareto efficiency.


CSC523                                                                                               23
CSC523: Analysis of the P2P BitTorrent Protocol                                          Abram Hindle




        [Pla03]    David Player. Bittorrent chokepoint detection and response. 2003.
                   http://groups.yahoo.com/group/BitTorrent/message/3473.

        [SAM03]    Sandip Sen, Stephane Airiau, and Rajatish Mukherjee. Towards a
                   pareto-optimal solution in general-sum games. In Proceedings of the
                   second international joint conference on Autonomous agents and
                   multiagent systems, pages 153–160. ACM Press, 2003.

        [SW02]     Subhabrata Sen and Jia Wang. Analyzing peer-to-peer traffic across
                   large networks. In Proceedings of the second ACM SIGCOMM
                   Workshop on Internet measurment, pages 137–150. ACM Press, 2002.

        [TDL04]    Andrew Park Toby Donaldson and I-Ling Lin. Emotional pathfinding,
                   2004.




CSC523                                                                                            24

More Related Content

Viewers also liked

Opportunity routes with post its
Opportunity routes with post itsOpportunity routes with post its
Opportunity routes with post itsDesignknowhow
 
Inflatable Display Systems
Inflatable Display SystemsInflatable Display Systems
Inflatable Display Systemsbbcmaryland
 
1.Święto narodzenia Pańskiego we wczesnym Kościele
1.Święto narodzenia Pańskiego we wczesnym Kościele1.Święto narodzenia Pańskiego we wczesnym Kościele
1.Święto narodzenia Pańskiego we wczesnym Kościeleparakletos
 
Porting Gentoo to DragonFly
Porting Gentoo to DragonFlyPorting Gentoo to DragonFly
Porting Gentoo to DragonFlyNaohiro Aota
 
Social definitions
Social definitionsSocial definitions
Social definitionsBrandt
 
ATM THEFT BY PRAKASH JANAWADE
ATM THEFT BY PRAKASH JANAWADEATM THEFT BY PRAKASH JANAWADE
ATM THEFT BY PRAKASH JANAWADEPrakash Janawade
 
Govt of Nepal Rules for Allocation of Business of Ministries Paush 14th 2072
Govt of Nepal Rules for Allocation of Business of Ministries Paush 14th 2072Govt of Nepal Rules for Allocation of Business of Ministries Paush 14th 2072
Govt of Nepal Rules for Allocation of Business of Ministries Paush 14th 2072Bhim Upadhyaya
 
8.Droga kościoła do samodzielności
8.Droga kościoła do samodzielności8.Droga kościoła do samodzielności
8.Droga kościoła do samodzielnościparakletos
 
Word of world by pamela fox
Word of world by pamela foxWord of world by pamela fox
Word of world by pamela foxBhim Upadhyaya
 
Howtoよいデザイン
HowtoよいデザインHowtoよいデザイン
HowtoよいデザインHiroki Yagita
 
Magazine
MagazineMagazine
MagazineJulia
 
Mass Ave Wine Shop Article
Mass Ave Wine Shop ArticleMass Ave Wine Shop Article
Mass Ave Wine Shop Articlemmorone
 
Theres nothing like a good book
Theres nothing like a good bookTheres nothing like a good book
Theres nothing like a good bookMolly Smart
 
Comic strip project 2 final draft
Comic strip  project 2 final draftComic strip  project 2 final draft
Comic strip project 2 final draftKthorland
 

Viewers also liked (20)

Ch20
Ch20Ch20
Ch20
 
Opportunity routes with post its
Opportunity routes with post itsOpportunity routes with post its
Opportunity routes with post its
 
Inflatable Display Systems
Inflatable Display SystemsInflatable Display Systems
Inflatable Display Systems
 
1.Święto narodzenia Pańskiego we wczesnym Kościele
1.Święto narodzenia Pańskiego we wczesnym Kościele1.Święto narodzenia Pańskiego we wczesnym Kościele
1.Święto narodzenia Pańskiego we wczesnym Kościele
 
Porting Gentoo to DragonFly
Porting Gentoo to DragonFlyPorting Gentoo to DragonFly
Porting Gentoo to DragonFly
 
Italy
ItalyItaly
Italy
 
Silabus SIMDIG C2
Silabus SIMDIG C2Silabus SIMDIG C2
Silabus SIMDIG C2
 
Social definitions
Social definitionsSocial definitions
Social definitions
 
The Constitution
The ConstitutionThe Constitution
The Constitution
 
ATM THEFT BY PRAKASH JANAWADE
ATM THEFT BY PRAKASH JANAWADEATM THEFT BY PRAKASH JANAWADE
ATM THEFT BY PRAKASH JANAWADE
 
Narendra modi
Narendra modiNarendra modi
Narendra modi
 
Govt of Nepal Rules for Allocation of Business of Ministries Paush 14th 2072
Govt of Nepal Rules for Allocation of Business of Ministries Paush 14th 2072Govt of Nepal Rules for Allocation of Business of Ministries Paush 14th 2072
Govt of Nepal Rules for Allocation of Business of Ministries Paush 14th 2072
 
Automation
AutomationAutomation
Automation
 
8.Droga kościoła do samodzielności
8.Droga kościoła do samodzielności8.Droga kościoła do samodzielności
8.Droga kościoła do samodzielności
 
Word of world by pamela fox
Word of world by pamela foxWord of world by pamela fox
Word of world by pamela fox
 
Howtoよいデザイン
HowtoよいデザインHowtoよいデザイン
Howtoよいデザイン
 
Magazine
MagazineMagazine
Magazine
 
Mass Ave Wine Shop Article
Mass Ave Wine Shop ArticleMass Ave Wine Shop Article
Mass Ave Wine Shop Article
 
Theres nothing like a good book
Theres nothing like a good bookTheres nothing like a good book
Theres nothing like a good book
 
Comic strip project 2 final draft
Comic strip  project 2 final draftComic strip  project 2 final draft
Comic strip project 2 final draft
 

Similar to Analysis bit torrent protocol

Detecting BitTorrents Using Snort
Detecting BitTorrents Using SnortDetecting BitTorrents Using Snort
Detecting BitTorrents Using SnortRick Wanner
 
Bit Torrent Protocol Report
Bit Torrent Protocol ReportBit Torrent Protocol Report
Bit Torrent Protocol Reportgkmv
 
Pac sec2011 ruoando-nict-2011-11-09-01-eng
Pac sec2011 ruoando-nict-2011-11-09-01-engPac sec2011 ruoando-nict-2011-11-09-01-eng
Pac sec2011 ruoando-nict-2011-11-09-01-engRuo_Ando
 
Pac sec2011 ruoando-nict-2011-11-09-01-eng
Pac sec2011 ruoando-nict-2011-11-09-01-engPac sec2011 ruoando-nict-2011-11-09-01-eng
Pac sec2011 ruoando-nict-2011-11-09-01-engRuo Ando
 
Bit torrent protocol
Bit torrent protocolBit torrent protocol
Bit torrent protocolKarwan Jacksi
 
Copy Of Part 4
Copy Of Part 4Copy Of Part 4
Copy Of Part 4raeshu
 
P2P networking.pptx
P2P networking.pptxP2P networking.pptx
P2P networking.pptxWasiqMehraj2
 
P2P: Grid-oriented Distribution Systems
P2P: Grid-oriented Distribution SystemsP2P: Grid-oriented Distribution Systems
P2P: Grid-oriented Distribution SystemsLorin Olsen
 
Bit torrent protocol by milan varia
Bit torrent protocol by milan variaBit torrent protocol by milan varia
Bit torrent protocol by milan variaMilan Varia
 
Bit Torrent technology
Bit Torrent technology Bit Torrent technology
Bit Torrent technology Parth Akbari
 
Bittorrent Seminar by dhananjay pardeshi
Bittorrent Seminar by dhananjay pardeshiBittorrent Seminar by dhananjay pardeshi
Bittorrent Seminar by dhananjay pardeshidhananjaypardeshi13
 
Bittorrent Protocol(Interactive)
Bittorrent Protocol(Interactive)Bittorrent Protocol(Interactive)
Bittorrent Protocol(Interactive)Banu Prakash
 

Similar to Analysis bit torrent protocol (20)

Detecting BitTorrents Using Snort
Detecting BitTorrents Using SnortDetecting BitTorrents Using Snort
Detecting BitTorrents Using Snort
 
Bit Torrent Protocol Report
Bit Torrent Protocol ReportBit Torrent Protocol Report
Bit Torrent Protocol Report
 
P2P Lecture.ppt
P2P Lecture.pptP2P Lecture.ppt
P2P Lecture.ppt
 
Pac sec2011 ruoando-nict-2011-11-09-01-eng
Pac sec2011 ruoando-nict-2011-11-09-01-engPac sec2011 ruoando-nict-2011-11-09-01-eng
Pac sec2011 ruoando-nict-2011-11-09-01-eng
 
Pac sec2011 ruoando-nict-2011-11-09-01-eng
Pac sec2011 ruoando-nict-2011-11-09-01-engPac sec2011 ruoando-nict-2011-11-09-01-eng
Pac sec2011 ruoando-nict-2011-11-09-01-eng
 
Bit torrent a revolution in p2p
Bit torrent a revolution in p2pBit torrent a revolution in p2p
Bit torrent a revolution in p2p
 
Bit torrent protocol
Bit torrent protocolBit torrent protocol
Bit torrent protocol
 
Copy Of Part 4
Copy Of Part 4Copy Of Part 4
Copy Of Part 4
 
Peer to peer(p2 p)
Peer to peer(p2 p)Peer to peer(p2 p)
Peer to peer(p2 p)
 
P2P networking.pptx
P2P networking.pptxP2P networking.pptx
P2P networking.pptx
 
P2P: Grid-oriented Distribution Systems
P2P: Grid-oriented Distribution SystemsP2P: Grid-oriented Distribution Systems
P2P: Grid-oriented Distribution Systems
 
Bit torrent protocol by milan varia
Bit torrent protocol by milan variaBit torrent protocol by milan varia
Bit torrent protocol by milan varia
 
Torrent technology
Torrent technologyTorrent technology
Torrent technology
 
Bit Torrent technology
Bit Torrent technology Bit Torrent technology
Bit Torrent technology
 
BitTorrent.pdf
BitTorrent.pdfBitTorrent.pdf
BitTorrent.pdf
 
Bittorrent Seminar by dhananjay pardeshi
Bittorrent Seminar by dhananjay pardeshiBittorrent Seminar by dhananjay pardeshi
Bittorrent Seminar by dhananjay pardeshi
 
BitTorrent Protocol
BitTorrent ProtocolBitTorrent Protocol
BitTorrent Protocol
 
Bittorrent
BittorrentBittorrent
Bittorrent
 
Magnet links
Magnet linksMagnet links
Magnet links
 
Bittorrent Protocol(Interactive)
Bittorrent Protocol(Interactive)Bittorrent Protocol(Interactive)
Bittorrent Protocol(Interactive)
 

Analysis bit torrent protocol

  • 1. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle CSC523 University Of Victoria abez@cs.uvic.ca April 22, 2004 CSC523 1
  • 2. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle This Presentation • What am I going to cover? – Introduction to BitTorrent – Explanation of BitTorrent Protocol – Literature Review – Block Distribution – Game Theory , Prisoners Dilemma and Tit For Tat – Byzantine Generals Problem – Hashing – Empirical Study – Summary CSC523 2
  • 3. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Introduction • Terminology – P2P - Peer To Peer. Suggests multiple clients producing a mini-network. – Seeding - serving a file for download. – Leech - A client who is downloading from the seeders – Leeching - to download without contributing – Chunk - a piece of a file typically 64 KB to 256 KB in size. – Torrent - A file which provides a URL to the tracker as well contains a list of SHA1 hashes for the data being transfered. This is so that the hashes in the Torrent can be used to verify if the blocks received are valid or not. – Tracker - A middleman who informs the peers of all the other peers in the network. – Peer - A client to the network dedicated to a torrent. CSC523 3
  • 4. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle – Seeder - A Peer who has all the blocks in a torrent. – Choked - A connection is choked if not file data is passed through it. Control data may flow but the transmission of actual blocks will not. – Interest - indicates whether a peer has blocks which other peers want. – Snubbed - A peer acting poorly - not uploading - or sending bad control messages, usually disconnected or ignored. CSC523 4
  • 5. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Introduction • What is BitTorrent [Coh01b]? – File Transfer Protocol – P2P – Leeches upload chunks to other leeches – Leeches relieve some of the load of distributing chunks from the seeders. CSC523 5
  • 6. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Introduction • What isn’t BitTorrent? – Kazaa / Napster / Gnutella / etc.. – Doesn’t provide a search mechanism – No chat, search, browsing, repositories – Essentially BitTorrent is just for downloading files CSC523 6
  • 7. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Introduction • Why use BitTorrent. – Figure 1: A Classical Distribution Scheme [Coh01a] CSC523 7
  • 8. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Introduction • Why use BitTorrent. – Figure 2: A BitTorrent Distribution Scheme [Coh01a] CSC523 8
  • 9. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Introduction • Why use BitTorrent. – You want to share one group of files with people – You don’t want to spend n*filesize bytes in bandwidth – You only want to share your file with a small community (e.g. not Kazaa) – Cross platform – Open protocol, anyone can implement a client CSC523 9
  • 10. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Introduction • Who uses BitTorrent? – iD Software, to distribute Wolfenstien Enemy Territory – Redhat, to distribute CD iso images. – Pirates, to distribute big files such as music, movies, ebooks, tv and games. – Music Bootleggers, to distribute high quality live concert recordings. CSC523 10
  • 11. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle BitTorrent Usage • A Usual BitTorrent Configuration: – Tracker - administers the torrent, tracks historical data – Torrent - the File which contains a link to the tracker and hashes of each chunk of the distribution. – Seeder - the initial client who provides the file that is torrented. – The leech finds the torrent, the torrent points to a tracker. Then the leech receives a list of peers from the tracker. CSC523 11
  • 12. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle BitTorrent Algorithm • Seeders – Seeders release the rarest blocks first in random order. – Random order maintains a uniform distribution of blocks among peers. – A client that is good at distributing blocks will get more attention from the seeder. [Azu] – Seeder offloads work to the peers. CSC523 12
  • 13. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle BitTorrent Algorithm • Leeches and Peers – Chunks of files are traded. – Chunks are verified by hashes in the torrent. – Tit For Tat Algorithm. ∗ Those clients who upload the fastest to other clients get faster download rates from those clients. Some determination is to do with how much the client shares. – BitTorrent is for file distribution, not ensuring 1 to 1 upload to download ratios. – Assumption is about single clients not about groups of clients. CSC523 13
  • 14. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Literature Review • “Analyzing peer-to-peer traffic across large networks” by Sen and Wang [SW02] • “A Framework for the simulation of Agents with Emotions”, [BB01] by Bazzan and Bordini • “Emotional Pathfinding”, [TDL04] by Donaldson, Park and Lin • “A Framework for the simulation of Agents with Emotions”, [BB01] • “Notions of reputation in multi-agents systems: a review”, by Mui, Mohtashemi, and Halberstadt [MMH02] • “Towards a Pareto-optimal solution in general-sum games”, by Sen, Airiau and Mukherjee [SAM03] • “The Byzantine Generals Problem” [LSP82] by Lamport, Shostak and Pease • “Scalable Byzantine Agreement” [LS04] by Lewis and Saia CSC523 14
  • 15. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle • “FARSITE: Federated, Available and Reliable Storage for an Incompletely Trusted Environment” , by many authors at Microsoft Research [ABC+ 02] CSC523 15
  • 16. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Block Distribution • How are block initially and then later distributed. – Random Block First and Reasoning – Rarest Block First. – Results from Model ∗ E[X] = m + 2(m − m/n)ln(m − m/n) + c. CSC523 16
  • 17. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Game Theory • How is Game Theory Involved with BitTorrent? – Pareto Efficiency – Tit For Tat CSC523 17
  • 18. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Other Problems • Other problems consisted of – Byzantine Generals Problem – Hashing (SHA1) CSC523 18
  • 19. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Empirical Study • What did it consist of? – 5 Computers + Network – Software, Process Communication and synchronization – Modifying the BitTorrent client. – Test Bed scripts CSC523 19
  • 20. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Conclusions • BitTorrent is very interesting as it’s problem domain crosses many fields – Game Theory ∗ Tit For Tat algorithm works well to promote fairness. – Computer Networks and Reliability ∗ Block Distribution – Security ∗ Byzantine Generals Problem CSC523 20
  • 21. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle Future Work • To do: – Investigate the effectiveness of multiple clients on one machine versus one client using the same amount of upstream bandwidth. – Investigate the effects of never admitting you have any blocks. – Investigate the effects of externally limiting upstream bandwidth. – Dedicate bandwidth to the experiment such that the total network bandwidth does not alter the results. CSC523 21
  • 22. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle References [ABC+ 02] A. Adya, W. Bolosky, M. Castro, R. Chaiken, G. Cermak, J. Douceur, J. Howell, J. Lorch, M. Theimer, and R. Wattenhofer. Farsite: Federated, available, and reliable storage for an incompletely trusted environment, 2002. [Azu] Azureus. Azureus java bittorrent client details. http://azureus.sourceforge.net/details.php. [BB01] Ana L. C. Bazzan and Rafael H. Bordini. A framework for the simulation of agents with emotions. In Proceedings of the fifth international conference on Autonomous agents, pages 292–299. ACM Press, 2001. [Coh01a] Bram Cohen. Bittorrent: Introduction. 2001. http://www.bitconjurer.org/BitTorrent/introduction.html. [Coh01b] Bram Cohen. The offical bittorrent homepage. 2001. CSC523 22
  • 23. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle http://bitconjurer.org/BitTorrent/. [Coh03] Bram Cohen. Incentives build robustness in bittorrent. May 2003. [LS04] Clifford Scott Lewis and Jared Saia. Scalable byzantine agreement, 2004. [LSP82] Leslie Lamport, Robert Shostak, and Marshall Pease. The byzantine generals problem. ACM Trans. Program. Lang. Syst., 4(3):382–401, 1982. [MMH02] Lik Mui, Mojdeh Mohtashemi, and Ari Halberstadt. Notions of reputation in multi-agents systems: a review. In Proceedings of the first international joint conference on Autonomous agents and multiagent systems, pages 280–287. ACM Press, 2002. [MU03] Michael Mitzenmacher and Eli Upfal. Probabilistic Analysis and Randomized Algorithms: A First Course. Brown University, 2003. [par04] Pareto efficiency. 2004. http://en.wikipedia.org/wiki/Pareto efficiency. CSC523 23
  • 24. CSC523: Analysis of the P2P BitTorrent Protocol Abram Hindle [Pla03] David Player. Bittorrent chokepoint detection and response. 2003. http://groups.yahoo.com/group/BitTorrent/message/3473. [SAM03] Sandip Sen, Stephane Airiau, and Rajatish Mukherjee. Towards a pareto-optimal solution in general-sum games. In Proceedings of the second international joint conference on Autonomous agents and multiagent systems, pages 153–160. ACM Press, 2003. [SW02] Subhabrata Sen and Jia Wang. Analyzing peer-to-peer traffic across large networks. In Proceedings of the second ACM SIGCOMM Workshop on Internet measurment, pages 137–150. ACM Press, 2002. [TDL04] Andrew Park Toby Donaldson and I-Ling Lin. Emotional pathfinding, 2004. CSC523 24