[Click] nsclick - improving performance: SNS / Fast-NS

Michael Voorhaen michael.voorhaen at ua.ac.be
Fri May 7 16:48:13 EDT 2004


Hi all,

I came across two solutions that claim to speed up NS quite a bit. First of
all SNS which claims to have complexity O(N) instead of O(N²), with N being
the number of nodes. (See the text at the bottom for more info). The other
is Fast-NS which also seems to get good results).

My question to you: Has anyone ever tried these tools to improve performance
with nsclick, or if not do you think it would be possible to use them.

SNS is based on ns2-1.9 which might cause some problems. I have no idea if
it is possible to incorporate the changes into ns2-2.26. So far I haven't
been able to compile SNS yet, so I have little experience with it.

Fast-NS is something one of my colleagues showed me earlier today. Its
changes have already been incorporated into ns2-2.27, and there is a patch
available for ns2-2.26. So most likely this would work, since the paper
doesn't describe any changes that would affect the click functionality. 

The speed-ups of both techniques only show up when simulation over 100
nodes, so in many case the technique will not help much. However for larger
simulations the speed up seems to be really good.

Any comments are appreciated.

Best regards,
Michael Voorhaen

PS: the mail on SNS I received from the manet mailinglist last week

Dear Ravi,

Three critical properties for network simulators are accuracy, 
speed, and scale. ns2 and glomosim are pretty much equivalent on all three
axis. On accuracy, the core simulators, the protocol 
implementations, and the physical propagation and energy consumption models
have been vetted by the community. On speed & scale, the two simulators are
equally bad. In scenarios commonly used for evaluating 
ad hoc routing protocols (e.g. [1]), ns2 and glomosim perform and scale with
O(N^2), where N is number of nodes, with constant factors in the same
ballpark. In short, you will likely end up wasting a lot of time waiting for
ns2 or glomosim to finish. The choice between ns2 and glomosim thus comes
down to convenience of their respective programming environments.

I would like to point out SNS, an alternative simulator whose accuracy is
identical to ns2, but whose performance and scalability are 
significantly better. SNS is freely available for downloads here:
     http://www.cs.cornell.edu/people/egs/sns/

SNS is based on the same code base as ns2 - it shares the same protocol
implementations, the same physical propagation model and the same energy
consumption parameters. We have extensively checked its correctness against
ns2 (Note that simulations typically have some amount of non-determinism,
e.g. when packets are sent at precisely the same time, simulators may pick a
different global order. These effects may cascade and lead to slight
differences. When we force SNS and ns2 to follow the same global order, they
compute bit-for-bit identical results).

The main contribution in SNS is a restructuring of the internal events of
the simulation engine to cache and reuse computations. SNS 
eliminates redundant, expensive computations both within and across 
simulation runs through function caching and reuse. This enables SNS to
achieve performance and scale proportional to O(N) for common ad hoc
networking scenarios. SNS runs accurate 10000-node simulations in under an
hour.

The SNS programming environment is identical to ns2 - protocol
implementations written for SNS should work in ns2 without any
modifications, and vice versa.

Choosing a simulator is quite a difficult topic, open to religious arguments
of the kind one occasionally encounters in the comparison 
of programming languages. I hope this message pointed out three 
objective, scientific metrics for choosing a suitable simulator, and
suggested an alternative that improves two out of the three with no loss of
accuracy.

Gun.

--

[1] Josh Broch, David A. Maltz, David B. Johnson, Yih-Chun Hu, and Jorjeta
Jetcheva. A Performance Comparison of Multi-Hop Wireless Ad Hoc Network
Routing Protocols. In Proceedings of the Fourth Annual ACM/IEEE
International Conference on Mobile Computing and Networking, ACM, Dallas,
TX, October 1998. 

[2] Kevin Walsh, Emin Gun Sirer. Staged Simulation: A General Technique for
Improving Simulation Scale and Performance. To appear in ACM Transactions on
Modeling and Computer Simulation (TOMACS), April 2004. 

[3] Kevin Walsh, Emin Gun Sirer. Staged Simulation for Improving the Scale
and Performance of Wireless Network Simulations. In Procedings of the Winter
Simulation Conference, New Orleans, LA, December 2003. 

Ravi kumar writes:
>
>Hi all,
>
>         I am working on wireless security and i have
>to implement an algorithm on wireless networks, ad-hoc
>in particular.
>
>         I have seen some discussion in this group on
>both Ns-2 and Glomosim.I'd like to find out which one
>is better in regard to functionality and ease of use.
>i know that ns-2 is a generally accepted standard for simulation  in 
>the academic community. i dont know much about glomosim, anyway if i 
>need a opinion i guess this is the place to ask.
>
>   waiting for your views. thanks in advance
>
>ravi
>
>
>	
>		
>__________________________________
>Do you Yahoo!?
>Win a $20,000 Career Makeover at Yahoo! HotJobs  
>http://hotjobs.sweepstakes.yahoo.com/careermakeover 
>
>_______________________________________________
>manet mailing list
>manet at ietf.org
>https://www1.ietf.org/mailman/listinfo/manet
>


_______________________________________________
manet mailing list
manet at ietf.org
https://www1.ietf.org/mailman/listinfo/manet

========================================================
Michael Voorhaen
========================================================
Phd Student
Dept. of Mathematics and Computer Sciences
PATS (Performance Analysis of Telecommunication Systems)
University of Antwerp
Middelheimlaan 1
2020 Antwerpen, Belgium
G1.11
Phone: 03/2653905
Mail: michael.voorhaen at ua.ac.be
========================================================




More information about the click mailing list