[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance of NS



We agree with your observations that there are indeed plenty of rooms to
improve ns performance. We are not able to do those optimizations right
now, but if you have patches and they work with existing code, we would be
very happy to put them into the distribution (Thanks in advance :)

- ns Team

On Thu, 10 Feb 2000, Wei Tsang Ooi wrote:

> Hi,
> 
> Is anyone working on improving the performance of ns ?
> 
> IMHO, a lot of design decisions in ns are made to allow
> rapid-prototyping but not high performance.  As a result,
> ns crawls when the simulated network is large.
> 
> Below are some ideas I am exploring, but I am not familiar
> with ns enough to make any changes and still be sure that
> no others will be affected.
> 
> - profiles the otcl code in ns, and identify bottlenecks.
>   it should not be too difficult to insert code into otcl
>   to see how many times each Otcl instproc is called, and
>   how long each call takes.  
> 
> - optimizes the bottleneck somehow.  For example, I believe
>   "set" and "instvar" are the most common calls.  Is there a
>   way to speed these up (like by-passing the lookup) ?
> 
> - can some of the otcl code be moved into C++  space ?
>   For example, Node::add-route is called O(n^2) time
>   in Simulator::compute-flat-route, and is a major bottleneck
>   in start-up time.
> 
> - plain and simple code optimization.  For example, the current
>   Timer class (tcl/mcast/timer.tcl) makes many redundant calls
>   to "$ns cancel $id".  Also, we should be able to make 
>   RouteLogic::compute_routes() run faster.
> 
> Any comments ?
> -- 
> ______________________________________________________________
> [email protected]  System Lab, Upson Hall (607) 255-0102
>