[ns] routing-modifications that improve run-time in ns
Wed, 28 Feb 2001 15:07:53 -0800 (PST)
This is about a change that has been made to the way routing info was used
to populate classifiers (or routing tables) in NS. Until now, classifiers
used to be filled up with their routing info in OTcl; However
classifiers themselves being pure C++ objects, this resulted in
code that moved between C++ and OTcl resulting in not-too-efficient
We have made modifications to the routing code that have increased
run-time efficiency by about 70%. As an example, a 1000 node topology
that used to take ~20 mins to compute routes and populate classifiers, now
takes ~6 mins to do the same. Hopefully this would be useful to those of
you having run-time problems, especially for large topologies.
The major part of the code modification is listed as follows:
1. Simulator object is now a split object. It maintains (on C++ side) a
list of all nodes in the topology, and walks thru this list inorder to
populate classifers in each node. Future work: instead of having to
maintain 2 separate nodelists, (in C++ and Otcl), share the nodelist
already in OTcl (by doing lookup from OTcl nodelist).
2. Nodes now have a pointer to the routing module that is at the head of
routing module chain; routing info flows thru this chain. Future work:
implement the same in Otcl to get rid of the list of rtg-modules used by
3. Classifiers are attached (internally) to routing modules and are now
populated completely in C++.
4. Another future work includes allowing binding of NsObjects thus
enabling NsObjects as shared variables across the C++/OTcl boundary.
(so far we've had integers and doubles and variations only as bound
You can see these changes in ns-daily snapshot (maybe downloaded from
http://www.isi.edu/nsnam/ns/ns-build.html). Please note that the daily
snapshots tend to be unstable and so check the test-runs at
(http://www.isi.edu/nsnam/ns/ns-tests.html) to see if validation passed
for that day before downloading.
Be true to your work, your word, and your friend.