120 likes | 144 Views
This paper discusses the development of a BitTorrent simulator module for the OMNeT++ platform. The module is designed to accurately model the complexities of BitTorrent swarms and offers a range of features and advantages for simulation purposes. It includes a comprehensive implementation of the tracker and peer-wire protocols, supports variable peer connections and download strategies, and incorporates extra features such as asymmetric links and a churn model. Performance measurements and tools for simulation scenarios are also provided. The code is available under the GPL license.
E N D
A BitTorrent Module for the OMNeT++ Simulator MASCOTS 2009, London, UK G. Xylomenos (with K. Katsaros, V.P. Kemerlis and C. Stais)
Outline • Context • Motivation • Advantages • Features • Structure • Extras • Performance • Conclusion
Context • The ICT PSIRP Project • The Internet mostly disseminates data • Publish-Subscribe Internet Routing Paradigm • Clean slate approach to Future Internet • Pub-Sub at application and network levels • What does that have to do with BitTorrent? • PSIRP was motivated by content distribution • BitTorrent is the perfect benchmark for this! • Now if we only had a good BitTorrent simulator…
Motivation • Why a BitTorrent simulator? • BitTorrent swarms exhibit very complex behavior • Many mechanisms and strategies are at play • Traces are hard to gather and understand • Fully distributed systems are hard to monitor • Performance predictions are simply guesses • What happens when we modify a strategy? • Existing simulators were not detailed enough • Some omit large parts of the protocol • Others only work over abstract networks
Advantages • Why bother with our simulator? • It operates over the OMNeT++ platform • You can use it with everything available for OMNeT++ • Example: OMNeT++ supports two types of network • InetUnderlay: hosts with full TCP/IP stacks • SimpleUnderlay: simple and fast abstract hosts • It incorporates nearly all BitTorrent details • All policies and options are present and tunable • If something is missing, feel free to add it! • Extra features that simplify simulations • Asymmetric links, churn model, GT-ITM topologies
Features • Full implementation of tracker and peer-wire protocols • All messages are included • Arbitrary file, piece and block sizes • Variable number of peer connections (min/max) • Rarest first and random first download strategies • Data request pipelining • Tunable choking algorithm (intervals, peers) • Super seeding and end game modes • Not implemented (yet!): trackerless mode (DHT based)
Structure • Fully modularized code • Extends existing class hierarchy • Easier to modify and extend • Possibility of parallel simulation • Tracker module • Models a multi-threaded tracker • Tracker client module • Connects client with tracker • Peer-wire module • Models a multi-threaded peer
Extras • BitTorrent simulation scenarios are complex • Numerous widely dispersed nodes are needed • Hard to manually place and start them • Topology creation: GT-ITM import filter • Extension of the BRITE import tool • Supports hierarchical networks • Supports asymmetric (ADSL) access links • Host deployment: BitTorrent churn generator • Empirical distribution of host interarrival times • Based on actual BitTorrent trace data
Performance • CPU time measurements (Intel E5200 2.5GHz) • 200 MByte file • Mixed ADSL • GT-ITM • Full stack • 1400 routers • Skitter • Delays only • No queueing
Performance • Memory footprint measurements (Ubuntu, 4 GB RAM) • Same scenario
Performance • Question: which piece size minimizes download time? • Same scenario • 60 peers • Any differences? • Variance • Slope • Knee at 512
Conclusion • OMNeT++ based BitTorrent module • Comprehensive protocol model • Works with detailed and simplified stacks • Space/time vs. accuracy tradeoff • The difference is important! • Extra tools to help your simulations • Churn generator, topologies, mix of ADSL links • Code available under the GPL • http://mm.aueb.gr/research/bittorrent/ • New version for OMNeT++ 4 coming real soon now!