Page Content
Background
Motivation |
Quantitative stochastic simulation is a useful tool
for studying performance of stochastic dynamic systems, but it can
consume much time and computing resources. To overcome these limits,
parallel or distributed computation is needed. Akaroa-2 makes an
aproach to parallel simulation, that of multiple replications in
parallel or MRIP. NS-2 is a nice tool for network simulation, but does not provide support for statistical analysis of the obtained results. So by combining NS-2 and Akaroa-2 we add run-length control for simulations based on statistic measures to NS-2 as well as a speed-up if the simulation can be run on many hosts in parallel. The more precise objective for this project was to combine the Network Simulator with Akaroa-2 and to make the changes only in the ns part. This should give the opportunity to monitor a running ns simulation while not writing out excessive trace files. In addition, akaroa-2 provides the nice feature of an almost linear speedup with the number of hosts due to the MRIP (Multiple Replications In Parallel) method. |
ns-2
[1] |
ns-2 is a discrete
event simulator targeted at networking research. It provides
substantial support for simulation of TCP, routing, and multicast
protocols over wired and wireless (local and satellite) networks. For
more information about Network Simulator check the URL: Simulations are written in OTcl but if you need some specific behavior of the OTcl Classes you can write your own in C++. For a good tutorial : www.isi.edu/nsnam/ns/tutorial/index.html [2] For a Tcl/Tk- tutorial : hegel.ittc.ukans.edu/topics/tcltk/ [3] |
Akaroa-2
[4] |
Akaroa-2
has been developed at the University of Canterbury in Christchurch,
New Zealand by Prof. Dr. K. Pawlikowski, Dr. Don McNickle and Dr. Greg
Ewing. It is designed for running quantitative stochastic
discrete-event simulations on Unix multiprocessor systems or networks
of heterogeneous Unix workstations. Instead of dividing up the program
for parallelization - a tremendous effort -, multiple instances of an
ordinary simulation program are run simultaneously on different
processors. Akaroa-2 is freely available for educational purposes. For details of the usage policy please read this copyright notice. |
Jump Start
Installation | ||||||||||||||||||||||||||||||||||||||||||
Preparation
| ||||||||||||||||||||||||||||||||||||||||||
Assembling
| ||||||||||||||||||||||||||||||||||||||||||
Files to
download: rng.cc [5] rng.h [6] akaroa.cc [7] Or as zip file: nsak.zip [8] | ||||||||||||||||||||||||||||||||||||||||||
Files | ||||||||||||||||||||||||||||||||||||||||||
akaroa.cc In this file a new class Akaroa - derived from TclObject - is defined. The function calls from OTcl are mapped to Akaroa library calls. Also an new RNGImplementaion class was derived. It maps calls for a new uniformly distributed random number to the Akaroa Random Number Generator. Additionaly some intializations are performed. When running multiple replications of a simulation model in parallel, it is important that each simulaton engine uses a unique stream of random numbers. So we had to exchange the Random Number Generator. rng.h and rng.cc The class RNGImplementation has now a virtual long next() method instead of a normal one. The class RNG has a static void setRNGImplementation(RNGImplementation *imp) method, to set a new RNGImplementation when needed. The Akaroa-class uses it to install its own implementation. Due to its dynamic nature the random number stream of RNG is a pointer now. We added reference counting for the stream to ensure that there is only one RNGImplementation object. | ||||||||||||||||||||||||||||||||||||||||||
Usage | ||||||||||||||||||||||||||||||||||||||||||
In your ns-simulation.tcl
file do the following:
#include <akaroa.H> into your module and call AkObservation (observation); or AkObservation (parameternumber, observation); directly. | ||||||||||||||||||||||||||||||||||||||||||
Running a ns-2 simulation
under akaroa-2 | ||||||||||||||||||||||||||||||||||||||||||
First, you have to start the akmaster process that
controls the parallelization and the random number generator. > akmaster & Next, start the akslave process on every machine that you want to run your simulation on. It collects the results and starts and terminates the simulations locally. > akslave & You can use the BatchDistribution tool for this. This java tool will login on your behalf using ssh and run any command specified. Last, start akrun with the parameters like the number of hosts and the program to be executed, e.g.: > akrun -n 5 ns mm1.tcl Eventually, a result like this should appear:
| ||||||||||||||||||||||||||||||||||||||||||
Example ns script | ||||||||||||||||||||||||||||||||||||||||||
MM1 - Queueing system [9] | ||||||||||||||||||||||||||||||||||||||||||
Warning | ||||||||||||||||||||||||||||||||||||||||||
You should make sure that your
simulation reaches a steady state, especially when you use more
realistic traffic models, like self-similar traffic. Akaroa2 will
produce accurate results characterizing steady-state behaviour of the
simulated system only if that system can reach steady state within a
reasonable time interval. Simulation of systems converging to steady
state extremely slowly, or systems that are unstable and never reach
steady-state, will be automatically stopped. If you intend to execute a terminating simulation instead of steady-state one, then you need to use Akaroa2 in Independent Observation Mode; see Section 2.6 of the Akaroa2's manual. |
To top
Combination of AKAROA-‐2 and NS-2
Hagen Woesner, Eugen Gillich, Andreas Köpke (release)
Update |
Now works with ns-2 v.2.26, fixed a bug
(AkRandom() replaced by AkRandomReal()*MAX_INT) and simplified
akaroa.cc. Note: The new RNG of ns 2.26 has a complex interface, the rng.cc and rng.h you can download here support only the important subset. Write a mail, if somebody actually uses the new interface - this will result in link errors. |
m/simulation_group/akaroa/about.chtml
oftware_Components/Software/Tools/rng.cc
oftware_Components/Software/Tools/rng.h
oftware_Components/Software/Tools/akaroa.cc
oftware_Components/Software/Tools/nsak.zip
oftware_Components/Software/Tools/mm1.tcl
ls/software/tools/parameter/en/font3/maxhilfe/
Zusatzinformationen / Extras
Quick Access:
Schnellnavigation zur Seite über Nummerneingabe
Auxiliary Functions
Copyright TU Berlin 2008