Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
queue Init DWRR and its test scripts Feb 15, 2016
scripts
README.md
mqecn.patch Init patch & Remove old files Feb 14, 2016

README.md

MQ-ECN NS2 Simulation

Software requirements

To reproduce simulation results (Figure 9-13) of MQ-ECN paper, you need following softwares:

Installation

Download Network Simulator (NS) 2.35 and unzip it.

$ tar -zxvf ns-allinone-2.35.tar.gz

Copy mqecn.patch to the top ns-2.35 folder (ns-allinone-2.35) and apply the patch. Then install NS2.

$ cd ns-allinone-2.35
$ patch -p1 --ignore-whitespace -i mqecn.patch
$ ./install

Copy files of MQ-ECN code to ns-allinone-2.35/ns-2.35/queue/

Add queue/wrr.o queue/dwrr.o to ns-allinone-2.35/ns-2.35/Makefile

Run make on /ns-allinone-2.35/ns-2.35

Running Basic Simulations

Before running large-scale simulations, you can run several small-scale simulations to understand the basic properties of MQ-ECN. The scripts for basic simulations are test-wrr.tcl, test-wrr-2.tcl, test-dwrr.tcl and test-dwrr-2.tcl. The basic simulation scripts will generate three files: throughput.tr, qlenfile.tr and tot_qlenfile.tr.

  • The throughput.tr gives aggregate goodputs of different services. It has the following format:

    Time, Goodput of Service 1, ..., Goodput of Service N
    
  • The qlenfile.tr gives queue lengths (in bytes) of different service queues. It has the following format:

    Time, Queue Length of Service Queue 1, ..., Queue Length of Service N
    
  • The tot_qlenfile.tr gives the total queue length (in bytes) of the congested switch port. It has the following format:

    Time, Queue Length of Switch Port
    

Running Large-Scale Simulations

At the beginning, we briefly introduce the usage of each file in scripts directory.

Hence, to run simulations in parallel:

python run_simulation_diffserv.py

There are many parameters to configue in run_simulation_diffserv.py. Note that you need to modify ns_path and sim_script correspondingly. By default, it runs 20x simulations in parallel and iterates over the per-queue ECN with the standard threshold, per-queue ECN with the minimum threshold and MQ-ECN. For each simulation, it will create a directory with the following name:

diffserv_[scheduler]_[transport]_scheme_[ECN scheme]_load_[network load]_service_[number of queues]

Each direcotry consists of two files: flow.tr and logFile.tr. The flow.tr gives flow completion time results with the following format:

number of packets, flow completion time, number of timeouts, src ID, dst ID, service (queue) ID

You can use result.py to parse flow.tr files as follows:

$ python result.py -a -i [directory_path]/flow.tr

Contact

If you have any question about MQ-ECN simulation code, please contact Wei Bai.

Acknowledgements

We thank Mohammad Alizadeh for sharing pFabric simulation code and DCTCP patch.