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

Re: Performance of NS




	I do agree that there are rooms to improve ns's performance. I'm
studying the routing architecture of ns. I found that every 'rtObject'
store information about all nodes in the network topology. During
initialization, it set all nodes to 'unreachable' and then compute the
routes. I don't think this is necessary. If a node is not found in the
routing table, it should be regarded as unreachable. Am I right?

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
>