[Ns-developers] ns-3-dev performance
Gustavo Carneiro
gjcarneiro at gmail.com
Sat Mar 3 06:16:38 PST 2007
On 3/3/07, mathieu lacage <Mathieu.Lacage at sophia.inria.fr> wrote:
>
> On Sat, 2007-03-03 at 13:40 +0000, Gustavo Carneiro wrote:
> > On 3/3/07, mathieu lacage <Mathieu.Lacage at sophia.inria.fr> wrote:
> > >
> > >
> > > But I would be interested in seeing your benchmark code or real
> > > profiling results (I suggest oprofile for the profiling part). Real
> data
> > > is always interesting.
> >
> >
> > You're right, profiling is always interesting. In this case,
> profiling
> > shows that 75% of the CPU time is inserting events into the scheduler:
> >
> > CPU: Core 2, speed 1862 MHz (estimated)
> > Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a
> unit
> > mask of 0x00 (Unhalted core cycles) count 100000
> > samples % image name app name
> symbol
> > name
> >
> -------------------------------------------------------------------------------
> > 1291002 74.9078 libsimulator.so libsimulator.so
> > ns3::SchedulerList::RealInsert(ns3::EventImpl*,
> ns3::Scheduler::EventKey)
> > 1291002 100.000 libsimulator.so libsimulator.so
> > ns3::SchedulerList::RealInsert(ns3::EventImpl*,
> ns3::Scheduler::EventKey)
> > [self]
> >
> > Bottom line is that headers serialization are not responsible for most
> of
> > the time. So nevermind my suggestion.
> >
> > Wow! With the knowledge of the above, I inserted a line
> > "Simulator::SetBinaryHeap ();" into the program, and simulation time
> dropped
> > from about 5 minutes (1 second simulated time) to less than one second
> (!).
> > Amazing.
>
> haha. And what about the StdMap scheduler ? Can it beat the Binary
> Heap ?
Nope, StdMap is about the same speed as BinaryHeap, or perhaps just
marginally slower.
An interesting experiment would be also to validate that the Binary Heap
> is not buggy: you would need to enable logging and check that the two
> simulations generate the same log output (beware: can be _very_ large
> files)
>
> > Shouldn't the binary heap schedule be the default?
>
> It really depends on the type of scenario you run. On my personal
> simulations, list always binary heap and std map.
Hm.. OK.
I do indeed have a strange and non-reallistic scenario where 10000 events
are generated at the same time and this process is repeated many times. It
probably highlights the worse in the list scheduler.
--
Gustavo J. A. M. Carneiro
"The universe is always one step beyond logic."
More information about the Ns-developers
mailing list