Home
Name Modified Size InfoDownloads / Week
vssver.scc 2011-05-14 384 Bytes
WorkloadProcessor.cs 2011-05-14 12.9 kB
SimParameters.cs 2011-05-14 16.7 kB
Stats.cs 2011-05-14 5.2 kB
tags 2011-05-14 58.4 kB
Transfer.cs 2011-05-14 4.6 kB
RateMeasurer.cs 2011-05-14 2.7 kB
README.txt 2011-05-14 3.9 kB
Sim.cs 2011-05-14 13.3 kB
OctoSim.vssscc 2011-05-14 256 Bytes
PieceDeliveryEvent.cs 2011-05-14 2.4 kB
ProtocolMain.cs 2011-05-14 9.7 kB
OctoSim.sln 2011-05-14 898 Bytes
OctoSim.sln.old 2011-05-14 910 Bytes
OctoSim.suo 2011-05-14 55.3 kB
OctoSim.userprefs 2011-05-14 494 Bytes
OctoSim.csproj.user 2011-05-14 2.5 kB
OctoSim.csproj.vspscc 2011-05-14 257 Bytes
OctoSim.pidb 2011-05-14 71.5 kB
mssccprj.scc 2011-05-14 279 Bytes
Node.cs 2011-05-14 50.3 kB
OctoSim.csproj 2011-05-14 7.3 kB
Logger.cs 2011-05-14 4.2 kB
Main.cs 2011-05-14 9.6 kB
Makefile 2011-05-14 107 Bytes
DemuxManager.cs 2011-05-14 5.2 kB
EventQueue.cs 2011-05-14 6.4 kB
ListElement.cs 2011-05-14 344 Bytes
Choker.cs 2011-05-14 12.9 kB
codenotes.txt 2011-05-14 1.1 kB
Connection.cs 2011-05-14 6.3 kB
app.config 2011-05-14 144 Bytes
Budget.cs 2011-05-14 1.6 kB
Totals: 33 Items   368.1 kB 0
OCTOSIM: A BitTorrent Simulator
-------------------------------

This release contains the code for the simulator which forms the 
basis of our paper:

  Ashwin Bharambe, Cormac Herley and Venkat Padmanabhan: 
  
    "Analyzing and Improving a BitTorrent Network's Performance Mechanisms"  
      IEEE INFOCOM 2006, Apr 23 - Apr 29, Barcelona, Spain.

Getting Started
---------------
Installation: 

 + On Linux, you must have mono (the CLR runtime) and mcs (mono C# compiler)
   installed. Visit http://www.mono-project.com/ to obtain that. For new
   distributions, it is also possible that pre-built binary packages will be
   available.
   
   To compile, just type "make" 
   
 + On Windows, open the .sln file in Visual Studio and build!

How to run:

Take a look at the perl scripts in ../scripts/ and ../cmu_scripts/, as well as 
workload files in ../workloads/.

Simulator Model
---------------
The simulator models the data plane of BitTorrent. Some details about
the model follow:

 - We model a file breaking down into a configurable number of pieces
   (blocks). Sub-pieces are not modeled. I suspect modeling those is
   akin to increasing the total number of pieces, however this may not
   be entirely true. 
 
 - BitTorrent's choking algorithm is implemented. Upload and download
   rate of nodes is measured exactly as in BitTorrent (running average). 
 
 - We do not model the end-game mode of BitTorrent. This mode is used
   for speculative downloading towards the end of the torrent so as to
   finish up the last few pieces even quicker. We believe it does not
   impact the overall performance characteristics of the protocol.

 - Only bandwidth modeling in the underlying topology is supported.
   In other words, it models queueing delays on links but does not model
   propagation delays. This is okay under some scenarios. We do not
   model bottlenecks inside the core network - only last-mile
   bottlenecks are modeled. Lastly, TCP dynamics are not modeled. It is
   assumed that flows use their fair-share (independent of the RTTs) of 
   the link bandwidth and that they do so instantenously after the
   addition or removal of flows.

 - We also model our enhancements to the BitTorrent protocol. These
   include FEC'ing seeded blocks, "smart seed" policy (see paper),
   block-level fairness algorithms (see paper), etc. Looking at
   SimParameters.cs can give a reasonable introduction to the parameters
   (and the corresponding features). 
   
Code Organization
------------------
A very brief description of the simulator code. Please refer to the code
directly for all the details. I will just try to give an overview of the
control flow here.

1) Main.cs: processes command line arguments, stores into array.

2) WorkloadProcessor.cs: reads workload file, interprets commands,
creates a simulator instance and starts the simulator "loop".

3) Sim.cs: simulator class; implements an event-queue and bandwidth
sensitive "fluid" flows.

4) ProtocolMain.cs: contains utility events and functions which drive
the simulation by injecting appropriate events at proper times.

5) Node.cs: this is the CORE of the entire system. See
Node.JoinNetwork(). This is where each node starts its life in the
system. All protocol operations start from JoinNetwork(). 

6) SimParameters.cs: list of most of the parameters accepted by the
simulator.

Why OCTOSIM?
------------
At some point, Octopus was chosen as a name for our new improved system. We
gave up on that name quickly but the simulator name stuck. :)

Support
-------
This is research quality code. Please do not expect it to have great
structure, comments, etc. despite our attempts to have them. That said,
please do let us know about any bugs that you may find (they exist, of
course!). Thanks, and we hope this is useful.

Authors
-------
 Ashwin R. Bharambe
 Cormac Herley
 Venkat Padmanabhan
Source: README.txt, updated 2011-05-14