Efficient Simulation of Large-Scale P2P Networks: Packet-level vs. Flow-level Simulations Kolja Eger Hamburg University of Technology Tobias Hoßfeld, Andreas Binzenhöfer University of Würzburg Gerald Kunzmann Technical University of Munich Communication Networks Kolja Eger, Prof. Dr. U. Killat 1 1 Overview • P2P Content Distribution • Motivation • BitTorrent • Simulation scenarios • Simulation results • Related work • Conclusion Communication Networks Kolja Eger, Prof. Dr. U. Killat 2 1 P2P Content Distribution • Load is distributed among the peers, whereas servers carry all the load in client/server architecture Scalability • Aims at avoiding centralized services good resilience • Multi-source download (swarming, multipoint-to-point) – File is fragmented into chunks – Peer uploads when it finishes one chunk – Load balancing Communication Networks Kolja Eger, Prof. Dr. U. Killat 3 1 Motivation • Analyze BitTorrent by simulation • Packet-level simulation: – Detailed simulation (e.g.TCP), cross-layer interactions visible • Flow-level simulation: – Simulation of large P2P networks possible • Differences between packet and flow-level simulations? • Strengths and weaknesses of BitTorrent? • Which functionalities are useful for CDNs? Communication Networks Kolja Eger, Prof. Dr. U. Killat 4 1 BitTorrent Most popular P2P application – Accounts for 30% of all traffic on the Internet in 2005 – Integrated in Opera browser, extension for Firefox available • One overlay network for each file, NO search • Tracker – Centralized component which stores information about all peers – Peers contact tracker to get a random subset of other peers in the network – Newer versions support DHT trackerless BitTorrent • Peers exchange chunks with each other Communication Networks Kolja Eger, Prof. Dr. U. Killat 5 1 Incentive mechanism in BitTorrent • Unchoking: Peer uploads to a fixed number of other peers (default =5) When downloading (leecher): • Peer chooses peers from which it has highest download rates for upload (every 10s) tit-for-tat • Optimistic unchoke: – Find better connections than the currently used ones – unchoke one peer independently from its rate (every 30s) When download completed (seed): • Choose peers based on upload rates Communication Networks Kolja Eger, Prof. Dr. U. Killat 6 1 Chunk Selection • When a peer is unchoked it requests a chunk according – Strict priority: • Request started but incomplete chunks • Only complete chunks (where data integrity is verified) are forwarded – Rarest first: • Estimate rarity of chunks by chunk information of neighbors – Random • Without any chunk request a random chunk • Ensures faster completion of the first chunk • Super-seeding: Original seed uploads whole file once to the network before uploading duplicate chunks Communication Networks Kolja Eger, Prof. Dr. U. Killat 7 1 Simulator • Ns-2 for packet-level simulations – Extend implementation to transfer application data – Different topologies • Star • Overlay topology (access link + overlay link) • German network • Flow-level simulations: – Upload bandwidth of peers is the bottleneck – Ignore overhead of BitTorrent protocol and TCP – Distribute bandwidth evenly over data connections Communication Networks Kolja Eger, Prof. Dr. U. Killat 8 1 Simulation Scenarios • Flash crowd – One seed, P-1 leechers, U parallel uploads – File size SF, chunk size SC, peers’ capacity C – Download time until all peers have the file • Constant peer population – L leechers, S seeds (const.) – Download rate of leechers: Communication Networks Kolja Eger, Prof. Dr. U. Killat 9 1 Flash Crowd • File size 100 MB • Cuplink =1024 kbps • Cdownlink = 8·Cuplink < 27% • Star topology with random delay between 1-50ms • Results with super-seeding • w/o super-seeding up to 70% higher download times < 9% • For other Cuplink differences < 20% and < 30% , resp. Communication Networks Kolja Eger, Prof. Dr. U. Killat 10 1 Constant Peer Population • 1 seed, 99 leechers • Cuplink=1024kbps • Topologies have same RTT • Optimal: 811s • Flow sim. only 3% higher (838s on average) • Packet sim. < 21% higher (960s, 973s, 961s on ave.) • Mean of 15s for first chunk Communication Networks Kolja Eger, Prof. Dr. U. Killat 11 1 Delay • Star topology • Links with 10ms and 100ms propagation delay • Mean download time: 857s on 10ms links 1237s on 100ms links 44% larger RTT bias Communication Networks Kolja Eger, Prof. Dr. U. Killat 12 1 Related Work • BitTorrent – tit-for-tat does not avoid unfairness [3], especially for the allocation of altruistically resources and with heterogeneous capacities • Resource pricing [1,2,3] – Controls the upload rate based on price information – Ensures fairness and provides a Nash equilibrium – No RTT bias – As transport protocol avoids congested links of IP network Communication Networks Kolja Eger, Prof. Dr. U. Killat 13 1 Conclusion • BitTorrent’s main advantages for content distribution – Use of bandwidth of all peers – Multi-source download • Flow-level simulations are near optimal performance • Packet-level deviate at most by 30% BitTorrent is very efficient • Higher simulation complexity at packet-level but cross-layer interactions are taken into account BitTorrent has RTT bias, because TCP is used Communication Networks Kolja Eger, Prof. Dr. U. Killat 14 1 Thank you for your attention! Communication Networks Kolja Eger, Prof. Dr. U. Killat 15 1 [1] K. Eger, U. Killat, "Resource Pricing in Peer-to-Peer Networks", IEEE Communications Letters, vol. 11, no.1, pp. 82--84, 2007 [2] K. Eger, U. Killat, "TCPeer: Rate Control in P2P over IP Networks", 20th International Teletraffic Congress (ITC20), Ottawa, Canada, June 2007 [3] K. Eger, U. Killat, "Bandwidth Trading in Unstructured P2P Content Distribution Networks", Proc. Sixth IEEE International Conference on Peer-to-Peer Computing (P2P2006), Cambridge, UK, pp. 39--46, Sept. 2006 Communication Networks Kolja Eger, Prof. Dr. U. Killat 16 1
© Copyright 2026 Paperzz