[ns] Poor simulation time performance in ns-2.27
xu at cc.gatech.edu
Fri Nov 26 22:12:28 PST 2004
Have you tried to compare the performance of simulations
other than the propriatery ad hoc routing simulation? If you
have, was the contrast as weird?
On Wed, 24 Nov 2004, Alaattin Caliskan wrote:
> Dear All,
> I recently upgraded my ad hoc networking simulation environment in terms of
> hardware and software, expecting to decrease the total time spent to run
> simulations. However, instead, the time spent to complete simulation runs
> has become much worse. I am hoping someone can suggest the reason for the
> sluggish performance, and maybe even a solution.
> My old simulator incorporated a Dell dual 1 GHz CPU machine with Red Hat
> 6.2, 1 GB RAM, kernel 2.2.16, and gcc version 2.96. Ns-2.1b7a version was
> used. The simulated code was a propriatery ad hoc routing protocol, in
> scenario settings similar to the CMU's Mobicom98 paper.
> The new machine is a dual 3 GHz CPU Dell with Red Hat Enterprise WS version
> 3, 4 GB RAM, kernel 2.4.21, and gcc 3.2.3. I ported the propriatery ad hoc
> routing code to ns-2.27.
> A simple simulation scenario that took 1:20 minutes to complete in the old
> configuration (old computer, ns-2.1b7a) now completes in 2:30 minutes in the
> new configuration (new computer, ns-2.27). Same negative performance
> difference applies for scenarios of various traffic and mobility patterns.
> I have benchmarked the file I/O with a tool called bonnie++. The new
> machine's IO performance (SATA RAID) is multiple times faster in every
> aspect, so this cannot be the cause.
> I have transferred the ns-2.1b7a simulator binary from the old machine to
> the new machine and repeated the simulation runs. In this case, the run
> completes in 30 seconds. This is better than the 1:20 minutes on the old
> machine but a factor of 5 worse than the same propriatery ad hoc routing
> code in ns-2.27 (2:30 minutes).
> I have also enabled profiling in gcc and analyzed the results. Gprof
> reported accumulated times are:
> * ~25 seconds on old computer and ns-2.1b7a (vs 1:20 minute actual simulator
> run time)
> * ~ 9 seconds on new computer and ns-2.1b7a (vs 30 second actual simulator
> run time)
> * ~7 seconds on new computer and ns-2.27 (vs 2:30 minutes actual simulator
> run time)
> I am confused why profiling reports a speed increase with the new computer
> as expected, and also another ~20% increase with ns-2.27 vs ns-2.1b7a, but
> the actual total time it takes to complete the simulation run is way off.
> Can there be some major code linked from external libraries, which is not
> reported in profiler output, and be causing the performace hit?
> By the way, the latest snapshot of ns-2 gives approximately same results as
> ns-2.27. No help there...
> Please let me know, even if you have a small clue, what might be going on.
> All suggestions will be appreciated.
> Thank you
Donghua Xu Email: xu at cc.gatech.edu
College of Computing Homepage: http://www.cc.gatech.edu/~xu
Georgia Tech Phone: (404)894-6736(office)
More information about the Ns-users