Git Product home page Git Product logo

mq-ecn-ns2's Introduction

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.

mq-ecn-ns2's People

Contributors

baiwei0427 avatar

Watchers

逐星 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.