Docsity

Optimizing Memory and Event List in Network Simulation: GTNetS Case Study - Prof. George R, Papers of Computer Systems Networking and Telecommunications

Toggle sidebar
bg1
Proceedings of the 2003 Winter Simulation Conference
S. Chick, P. J. Sánchez, D. Ferrin, and D. J. Morrice, eds.
LARGE–SCALE NETWORK SIMULATIONS WITH GTNETS
George F. Riley
College of Engineering
School of Electrical and Computer Engineering
Georgia Institute of Technology
Atlanta, GA 30332-0250, U.S.A
ABSTRACT
When designing a network simulation environment intended
specifically for modeling large–scale topologies, a numbero f
issues must be addressed by the simulator designer. Mem-
ory requirements for network simulation engines can grow
quadratically with the size of the simulated topology and
can easily exceed available memory on modern worksta-
tions. The number of outstanding simulation events grows
linearly with the number of packets in flight being modeled,
and can lead to performance bottlenecks when managing a
sorted event list of millions of events. Tracking the results
of the simulation using a packet–level log file can result in
excessive usage of disk space. We discuss the design of the
Georgia Tech Network Simulator (GTNetS) with emphasis
on how GTNetS addresses these issues. We give results from
performance experiments showing the reduction in memory
and event list size as a result of our design decisions.
1 Introduction
Computer based simulation is widely used in almost all areas
of networking research. A number of high–quality simula-
tion tools exist and are in widespread use. These tools allow
researchers to test and validate new and existing protocols
under a variety of conditions. An experimental protocol can
be shown to work correctly in the presence of packet losses,
packet re–ordering, lengthy delays, and lengthy round–trip
times. This type of protocol validation is typically done on
fairly small scale topology models, since the objective at this
point is protocol correctness.
Once these protocols are known to be correct, the behav-
ior of these protocols must be demonstrated in realistic size
networks to insure that the performance of the protocol will
be acceptable when deployed on a large scale. The vener-
able and widely used ns2 (McCanne and Floyd 1997) can
comfortably model networks of a few hundred to a few thou-
sand network elements. Tools such as pdns (Riley, Fujimoto,
and Ammar 1999) and SSFNet (Cowie, Ogielski, and Nicol
2002) can be used on topologies of up to 100,000 network
elements, although this can be time consuming. The cre-
ation of larger–scale simulation topologies often consumes
excessive amounts of CPU time and system memory, mak-
ing this type of experimentation more daunting and th erefore
less common.
As the size of the simulated topology (and the number of
data flows being modeled) grows to very large scales, com-
puter resources in the simulation environment become the
most critical issue, and generally are the limiting factor for
the topology size of the network model. These resources
include memory constraints, disk space constraints and and
CPU time. See (Riley and Ammar 2002) for a detailed analy-
sis of the overhead in all three of these areas using the popular
ns2 simulation environment. This analysis indicates that, to
achieve moderate to large–scale simulations for computer
networks, the simulator must be designed from the begin-
ning with scalability in mind. The Georgia Tech Network
Simulator (Riley 2003) was designed in this way, and has
demonstrated good scalability and efficiency with network
models consisting of several million network elements. GT-
NetS is designed to utilize distributed simulation techniques,
enabling linear scalability on a low–cost network of work-
stations. Here, we focus on efficiencies in a single sequential
simulation only.
The remainder of this paper is organized as follows. Sec-
tion 2 gives an overview of some of the network simula-
tion tools presently in use. Section 3 discusses the tradeoffs
and design decisions used in the GTNetS design that led to
memory and CPU efficiency when simulating large–scale
networks. Section 4 gives some performance results using
GTNetS. Finally, section 5 summarizes this work.
2 Related Work
There are a number of existing network simulation tools in
existence that are in widespread use within the networking
research community. Each of these has strengths and weak-
nesses, and no single simulation environment is suitable for
all possible simulation requirements. In this section, we dis-
cuss briefly several existing simulators, and indicate the ap-
proximate level of scalability achieved by each.
The ns2 Network Simulator. The venerable ns2 simula-
tor (McCanne and Floyd 1997) is certainly the most popu-
lar and widely used simulation environment for networking
research. It includes detailed models of a number of TCP
variations, a large number of queuing disciplines, several ap-
plication models (such as HTTP web traffic), and extensive
logging and tracing support. In addition, ns2 has supp ort for
both wired fixed networks, and wireless ad–hoc networks.
In the wireless domain, there are models for a number of
ad–hoc routing protocols, including Dynamic Source Rout-
ing (DSR) (Johnson and Maltz 1996), Ad–Hoc On–Demand
Distance Vector (AODV) (Perkins and Royer 1999); as well
as a very detailed mo del of the IEEE 802-11b MAC protocol
pf3
pf4
pf5
pf8

Partial preview of the text

Download Optimizing Memory and Event List in Network Simulation: GTNetS Case Study - Prof. George R and more Papers Computer Systems Networking and Telecommunications in PDF only on Docsity!

Proceedings of the 2003 Winter Simulation Conference

S. Chick, P. J. Sánchez, D. Ferrin, and D. J. Morrice, eds.

LARGE–SCALE NETWORK SIMULATIONS WITH GTNETS

George F. Riley

College of Engineering School of Electrical and Computer Engineering Georgia Institute of Technology Atlanta, GA 30332-0250, U.S.A

ABSTRACT

When designing a network simulation environment intended specifically for modeling large–scale topologies, a number of issues must be addressed by the simulator designer. Mem- ory requirements for network simulation engines can grow quadratically with the size of the simulated topology and can easily exceed available memory on modern worksta- tions. The number of outstanding simulation events grows linearly with the number of packets in flight being modeled, and can lead to performance bottlenecks when managing a sorted event list of millions of events. Tracking the results of the simulation using a packet–level log file can result in excessive usage of disk space. We discuss the design of the Georgia Tech Network Simulator ( GTNetS ) with emphasis on how GTNetS addresses these issues. We give results from performance experiments showing the reduction in memory and event list size as a result of our design decisions.

1 Introduction

Computer based simulation is widely used in almost all areas of networking research. A number of high–quality simula- tion tools exist and are in widespread use. These tools allow researchers to test and validate new and existing protocols under a variety of conditions. An experimental protocol can be shown to work correctly in the presence of packet losses, packet re–ordering, lengthy delays, and lengthy round–trip times. This type of protocol validation is typically done on fairly small scale topology models, since the objective at this point is protocol correctness. Once these protocols are known to be correct, the behav- ior of these protocols must be demonstrated in realistic size networks to insure that the performance of the protocol will be acceptable when deployed on a large scale. The vener- able and widely used ns2 (McCanne and Floyd 1997) can comfortably model networks of a few hundred to a few thou- sand network elements. Tools such as pdns (Riley, Fujimoto, and Ammar 1999) and SSFNet (Cowie, Ogielski, and Nicol

  1. can be used on topologies of up to 100,000 network elements, although this can be time consuming. The cre- ation of larger–scale simulation topologies often consumes excessive amounts of CPU time and system memory, mak- ing this type of experimentation more daunting and therefore less common. As the size of the simulated topology (and the number of data flows being modeled) grows to very large scales, com- puter resources in the simulation environment become the

most critical issue, and generally are the limiting factor for the topology size of the network model. These resources include memory constraints, disk space constraints and and CPU time. See (Riley and Ammar 2002) for a detailed analy- sis of the overhead in all three of these areas using the popular ns2 simulation environment. This analysis indicates that, to achieve moderate to large–scale simulations for computer networks, the simulator must be designed from the begin- ning with scalability in mind. The Georgia Tech Network Simulator (Riley 2003) was designed in this way, and has demonstrated good scalability and efficiency with network models consisting of several million network elements. GT- NetS is designed to utilize distributed simulation techniques, enabling linear scalability on a low–cost network of work- stations. Here, we focus on efficiencies in a single sequential simulation only. The remainder of this paper is organized as follows. Sec- tion 2 gives an overview of some of the network simula- tion tools presently in use. Section 3 discusses the tradeoffs and design decisions used in the GTNetS design that led to memory and CPU efficiency when simulating large–scale networks. Section 4 gives some performance results using GTNetS. Finally, section 5 summarizes this work.

2 Related Work

There are a number of existing network simulation tools in existence that are in widespread use within the networking research community. Each of these has strengths and weak- nesses, and no single simulation environment is suitable for all possible simulation requirements. In this section, we dis- cuss briefly several existing simulators, and indicate the ap- proximate level of scalability achieved by each.

The ns2 Network Simulator. The venerable ns2 simula- tor (McCanne and Floyd 1997) is certainly the most popu- lar and widely used simulation environment for networking research. It includes detailed models of a number of TCP variations, a large number of queuing disciplines, several ap- plication models (such as HTTP web traffic), and extensive logging and tracing support. In addition, ns2 has support for both wired fixed networks, and wireless ad–hoc networks. In the wireless domain, there are models for a number of ad–hoc routing protocols, including Dynamic Source Rout- ing ( DSR ) (Johnson and Maltz 1996), Ad–Hoc On–Demand Distance Vector ( AODV ) (Perkins and Royer 1999); as well as a very detailed model of the IEEE 802-11b MAC protocol

specification. ns2 can comfortably model network topolo- gies up to about 1,000 network elements with the default routing methods, and about 16,000 network elements using our NIx–Vector (Riley, Ammar, and Fujimoto 2000) routing method. Furthermore, by using parallel and distributed simulation methods, we have shown good scalability for ns2 , by ex- tending the basic simulation model to run on a network of workstations. Our Parallel/Distributed ns ( pdns ) (Riley, Fu- jimoto, and Ammar 1999), has been shown to scale to a net- work topology of 250,000 network elements (Riley, Ammar, and Fujimoto 2000).

The GloMoSim / Parsec Simulation Engine. Another well known and popular simulator is GloMoSim (Zeng, Bagrodia, and Gerla 1998), which is built on top of the Parsec (Bagro- dia, Meyer, Takai, Chen, Zeng, Martin, Park, and Song 1998) simulation engine. GloMoSim has been designed specifi- cally to model wireless networks, and is designed to run in a parallel environment on a tightly coupled symmetric– multiprocessor system. It has very detailed models of the 802-11b MAC protocol, a number of routing protocols (in- cluding Bellman/Ford, AODV (Perkins and Royer 1999), DSR (Johnson and Maltz 1996), and others), TCP, and vari- ous application models. GloMoSim was designed from the beginning to run in par- allel, and thus can achieve good parallel performance in some cases. However, the GloMoSim simulator uses tightly cou- pled shared memory for inter–process communication, which leads to limited scaling. In large–scale simulations, main memory is often the first resource to become exhausted. The dependence on shared–memory message passing limits the scale of a GloMoSim simulation to a single computing sys- tem, with the corresponding limits on available memory. Ad- ditionally, the original design criteria for the GloMoSim prod- uct were focused mainly on performance rather than scala- bility. Experiments by the developers of GloMoSim have demonstrated scalability up to about 1000 nodes.

The Scalable Simulation Framework ( SSFNet ). The SSFNet (Cowie, Nicol, and Ogielski 1999, Cowie, Liu, Liu, Nicol, and Ogielski 1999) simulator was originally devel- oped at Rutgers University (DIMACS), in collaboration with Dartmouth University, and is presently maintained and dis- tributed by Renesys Corp. The product was designed from the beginning to be scalable and to give good performance across a wide range of topology scales. The product is avail- able both in a Java environment, as well as a C++ imple- mentation. Like GloMoSim , SSFNet is designed to run on a tightly coupled SMP system, relying on a custom designed thread scheduler and efficient memory–to–memory message passing to achieve good parallel performance. Unlike Glo- MoSim , the SSF simulator was designed from the beginning with scalability in mind, and thus is careful about limiting memory consumption wherever possible. The SSF simu- lator has been demonstrated by the developers on network topologies as large as 100,000 network elements.

The OpNet Network Simulator. The OpNet (Bertolotti and Dunand 1993) simulator is a widely–used commercial software product developed by OpNet Technologies Inc. This simulator contains very detailed models of a large num- ber of network devices, including most commercial routers,

Link A−>B Node A Node B

Queue

Figure 1: Simple Network Topology

switches, and hubs; as well as a number of wireless devices and MAC protocols. The product is commercially success- ful, and has a large installed customer base. The product is presently limited to a single process running on a single computing platform, but a version able to execute on parallel processors in under development. Opnet also includes a High Level Architecture ( HLA ) interface, but this interfaces sup- ports interoperability with other tools such as traffic genera- tors, rather than distributed execution. Furthermore, efforts to model large networks using OpNet have had only limited success, primarily due to the limitations of single process execution. As part of our existing COMPASS research ef- fort, we developed a rudimentary distributed version of this product (Wu, Fujimoto, and Riley 2001), but achieved only limited success.

3 GTNetS Design

In this section, we discuss the design decisions in Georgia Tech Network Simulator that allowed more efficient simula- tion of very large–scale networks. These efficiencies fall into three basic categories:

  1. Reducing Event List Size
  2. Managing Memory
  3. Reducing Log File Size

Each of these areas are discussed in more detail below.

3.1 Reducing Event List Size

We have three optimizations that substantially reduce the overall size of the pending event queue. Since insertions into sorted queues are O(lgN ), reducing the size of this queue results in improved execution time.

3.1.1 FIFO Receive Queues

Consider the simple network topology shown in figure 1. This consists of two nodes, A and B, a simplex link connect- ing the nodes, and a packet queue associated with the link. To model the correct behavior of this topology, the simula- tor typically needs two pending simulation events for each packet transmitted. Each packet transmission will schedule one simulation event to indicate that the packet is received by the receiver, and a second event to indicate that transmission is completed at the sender. Note that these two events are at different simulation times due to the speed–of–light propaga- tion delay on the link. Pseudo–code for a packet transmission action is similar to the following:

the event. Timeout events are scheduled and processed with nano–second accuracy or better, resulting in a somewhat un- realistic simulation. In actual end–systems, timer events are processed on more granular Clock Tick intervals, which are typically on the order of milliseconds. With these issues in mind, we designed GTNetS using the concept of Timer Buckets , as follows. We start with speci- fying a user configurable timer buckets interval, which de- faults to ten milliseconds. We then create a simple vector data structure, with each entry in the vector representing all pending timeout events for a fixed timer buckets inter- val in the future. For example, the zeroth entry in the vector contains all timeout events scheduled for ten milliseconds in the future, the next entry is all timeouts for twenty mil- liseconds, and so forth. Each of these entries is called a Timer Bucket. We note that, for each timer bucket, entries are scheduled in strictly increasing timestamp order, and thus a simple FIFO queue, with constant insertion and removal time, can be used to maintain all pending timeouts for each bucket. When scheduling a new timeout event, we simply append the event to the tail of the FIFO queue for the ap- propriate timer buckets, which is a constant time operation. If the bucket was empty prior to the insertion, we schedule an event in the sorted event queue that represents the earliest timeout for any event in that bucket. When a timeout event is canceled (which does not necessarily occur in FIFO order), we do not remove the event from the FIFO queue unless it is the earliest pending event for that bucket. Rather, we simply mark it as canceled. When a timeout event is scheduled for processing, it will by definition be the earliest pending event for its bucket. At that time, it is removed from the head of the FIFO queue. If the new head is marked as canceled it is also removed (as are all consecutive canceled events that become the head of the queue). If the resulting FIFO queue is non–empty, a new sorted event list entry is scheduled for the appropriate simulation time for later processing. The timer buckets optimization reduces the size of the event list from O(k) where k is the number of active TCP flows, to O(j) where j is the number of timer buckets. The number of timer buckets is a function of the computed TCP round trip times and cannot be known precisely in advance. However, assuming a ten millisecond bucket size, the num- ber of buckets in a reasonable simulation is no more than a few hundred. Interestingly, this optimization also results in a more realistic simulation, since real TCP implementa- tions schedule and process timeouts in coarse grain clock tick intervals which are analogous to our timer bucket interval.

3.2 Managing Memory

A second area where care must be taken in simulator design is in memory management. While the GTNetS design is careful with memory usage in almost all areas, we present three particular memory management design decisions that result in substantial savings in the overall memory footprint of the simulation.

3.2.1 Routing Tables

The amount of memory required to create and maintain sim- ulated routing tables in a large–scale simulation can become excessive. In order to route packets through a network, each node must make a routing decision to determine the Next Hop node that represents the shortest path (or some other routing

Rest of Network

Leaf Nodes

Gateway

Figure 2: Point–to–Point Leaf Nodes

metric) to the ultimate destination. This decision typically involves referencing a Routing Table that has, in the extreme, one entry for every possible packet destination at each possi- ble routing decision point. This routing table lookup method results in memory requirements of O(N 2 ), where N is the number of nodes in the simulated topology. The popular ns simulator uses a hash–based routing lookup by default,which reduces this limit somewhat by ignoring unused entries. The SSFNet simulator uses routing aggregation methods based on IP prefixes, which also reduces the overall memory require- ments. In GTNetS , we use two optimizations which reduce or eliminate the memory requirements for routing tables. First is the use of the on–demand NIx–Vector routing method by default. This method does not use routing tables at all, but rather uses a source–based routing method whereby routing information is contained in each packet. Routes are computed as needed, and are cached at packet sources for later reuse. The NIx–Vector representation for the routing information is very compact and introduces little overhead in the packet routing decisions. The NIx–Vector routing ap- proach was previously published (Riley, Ammar, and Fuji- moto 2000) as part of our work with pdns , so details of this method are omitted here. GTNetS also supports the creation of static routing tables (based on a all–pairs shortest–path– first algorithm) if the presence of routing tables is required for the simulation results desired. Next is the elimination of any routing information (either the NIx–Vector creation or the static routing tables) at leaf nodes in the simulation. Consider the two simple topologies shown in figures 2 and 3. Figure 2 shows a portion of a topology with five leaf nodes, connected to the remainder of the topology by a single gateway using point–to–point links. Figure 3 shows a similar topology, with five leaf nodes on an Ethernet LAN and a single gateway. For the case of the point–to–point links in figure 2 it is

Rest of Network

Leaf Nodes

Gateway

Figure 3: Ethernet Leaf Nodes

PDU Stack Top

GTNetS Packet Unique ID Packet Size Creation Time PDU Stack HTTP TCP IP 802.

Figure 4: Typical GTNetS packet

easy to observe by inspection that routing decisions at the leaf nodes are trivial. In all cases, any packet generated by a leaf node is unconditionally forwarded to the gateway, excepting packets addressed to the leaf node itself. The GTNetS rout- ing computations will never calculate routing information for leaf nodes with a single point–to–point link, resulting in a substantial memory savings when using the static routing method. Surprisingly, the popular ns2 simulator does not implement this simple optimization.

The Ethernet LAN case shown in figure 3 is less obvious, but in fact can use the same optimization. When creating an Ethernet LAN in GTNetS , an optional single gateway can be specified which denotes the gateway node as shown. Packets generated at the leaf nodes can either be destined for another leaf on the same LAN, or somewhere else in the network. GTNetS checks for local routes using IP Addresses and Net- work Masks much like real network implementations. If a local route is found, then no routing decision is needed. If a local route is not found, then the packet is unconditionally forwarded to the gateway as described above. In neither case is any routing information required, and thus route compu- tations can be skipped for these leaf nodes.

3.2.2 Representing Packets

In a large–scale simulation with millions of nodes and flows, the number of Packets flowing through the network can be tens or hundreds of millions. Thus, careful attention must be given to efficient representation of simulated packets in order to keep the overall memory footprint manageable. However, there are design tradeoffs to be considered which may result in less flexibility and ease of use if memory usage is the only consideration. A typical packet in GTNetS is shown in figure 4. The packet consists of two parts. First are three fixed position fields identifying the packet,followed by the PDU Stack. The first three fields are included for ease of use of the simulator, and have no correspondence to real network packets. The unique identifier is a 32 bit value unique to this packet, and can be used in the simulator to track individual through the network. The timestamp field indicates the simulation time when this packet was created. The size field indicates the size, in bytes, of the packet including all Protocol Data Units ( PDUs ) associated with this packet. This size is the actual size of the data being transmitted, rather than the amount of memory used by the GTNetS packet representation. For example, the GTNetS IPV4 PDU is a C++ class object with a total size of 32 bytes. However, the size used to calculate the transmission time of the IPV4 PDU is of course 20 bytes plus the size of any IP Options. The PDU stack consists of PDU s which are appended and removed from the packet as it moves down and up the proto- col stack. When a new packet is generated by an application (for example a browser creating an HTTP request), the HTTP header is created and pushed on the PDU stack. At the next lower layer (TCP for example), an appropriate PDU is again generated and pushed, and the packet continues down the stack. When a packet is received from a link at a layer two processor (for example IEEE 802.3(IEEE 2000)), the PDU is popped and examined. However, in our design we do not actually remove the PDU pointer from the data structure, but rather simply adjust a Top pointer. This allows for the case where a PDU that is popped from the stack will immediately pushed back on (for example at the IPV4 layer at interior routers) and prevents an unnecessary delete and new opera- tion. It is clear that this approach is somewhat memory efficient in that each packet contains information for only those pro- tocol data units that are present in the packet. In contrast, ns2 packets have data fields for all possible PDU s, regard- less of whether that PDU is actually present in each particular packet. However, we could have gained additional memory efficiency by bit–packing and byte–packing, as is specified by RFC 760 (Postel 1980a) for example. We made the design decision in this case to sacrifice some memory efficiency for ease–of–use and flexibility. Since one use of network simu- lators is to study the affect of changes or additions to existing protocols, our method of PDU representation allows easy addition of new fields in protocol headers while at the same time maintaining an accurate representation of the actual size of a packet to be transmitted on a communications link.

3.3 Reducing Log File Size

Network simulations typically create a log file which traces the flow of packets through the simulated network. In the extreme case, every packet transmission and receipt on ev- ery link, plus every packet enqueue and dequeue operation at

1.77891 N0 L4-TCP 10000 80 0 0 SYN 0 0 L3-4 64 6 192.168.0.1 192.168.1.1 1

1.78391 N2 L3-4 63 6 192.168.0.1 192.168.1.1 1

1.88396 N3 L3-4 62 6 192.168.0.1 192.168.1.1 1

1.88897 N4 L3-4 61 6 192.168.0.1 192.168.1.1 1 L4-TCP 10000 80 0 0 SYN 0 0

1.88897 N4 L4-TCP 80 10000 0 0 SYN|ACK 0 0 L3-4 64 6 192.168.1.1 192.168.0.1 2

1.89398 N3 L3-4 63 6 192.168.1.1 192.168.0.1 2

1.99403 N2 L3-4 62 6 192.168.1.1 192.168.0.1 2

1.99904 N0 L3-4 61 6 192.168.1.1 192.168.0.1 2 L4-TCP 80 10000 0 0 SYN|ACK 0 0

1.99904 N0 L4-TCP 10000 80 0 0 ACK 0 0 L3-4 64 6 192.168.0.1 192.168.1.1 4

1.99904 N0 L4-TCP 10000 80 0 0 0 0 512 L3-4 64 6 192.168.0.1 192.168.1.1 5

2.00404 N2 L3-4 63 6 192.168.0.1 192.168.1.1 4

2.00409 N2 L3-4 63 6 192.168.0.1 192.168.1.1 5

2.10409 N3 L3-4 62 6 192.168.0.1 192.168.1.1 4

2.10456 N3 L3-4 62 6 192.168.0.1 192.168.1.1 5

2.10910 N4 L3-4 61 6 192.168.0.1 192.168.1.1 4 L4-TCP 10000 80 0 0 ACK 0 0

2.10961 N4 L3-4 61 6 192.168.0.1 192.168.1.1 5 L4-TCP 10000 80 0 0 0 0 512

2.10961 N4 L4-TCP 80 10000 0 512 ACK 0 0 L3-4 64 6 192.168.1.1 192.168.0.1 7

Figure 5: GTNetS Log File Excerpt

1

10

100

1000

10000

100000

1e+

1e+

0 2 4 6 8 10 12

Event List Size

Simulation Time

No Optimizations FIFO Rx FIFO+Abstract+Buckets

Figure 7: Event List Size

0

5e+

1e+

1.5e+

2e+

2.5e+

0 2 4 6 8 10 12

Event Count

Simulation Time

No Optimizations FIFO Rx FIFO+Abstract Q FIFO+Abstract+Buckets

Figure 8: Total Event Count

0

500

1000

1500

2000

2500

0 20000 40000 60000 80000 100000 120000 140000 160000 180000

Memory Footprint (MB)

Topology Size

Static, Single Gateway^ NIx-Vector Static

Figure 9: Memory Usage

with the FIFO receive queue plus timer buckets. We can see that with none of the optimizations, the event list grows to nearly 1.4 million events. The FIFO receive queue reduces the event list size to a maximum of about 100,000 entries, and with both optimizations the maximum size of the event list is only about 10,000. Figure 8 shows the total number of events scheduled for the same simulations, with the x–axis on a linear scale. This figure shows clearly the reduction in total event count by using the abstract queuing optimization, reducing the event count by nearly a factor of two. Also the timer buckets optimization reduces the event count slightly, since many timer events are canceled before getting sched- uled. The next set of experiments shows the affect of the memory efficiency optimizations discussed. We used the same cam- pus network topology as above, but this time used varying numbers of campus networks (from 10 to 400) and tracked the maximum memory footprint of the simulation. These results are shown in figure 9. In this figure, the x–axis is the

count of the total number of nodes in the topology, and the y–axis is size of the memory footprint in megabytes. The first plot is with NIx–Vector routing enabled, the second is with static routing and the single gateway optimization, and the last is with static routing. The hardware that we used for these experiments had 2Gb of main memory, which is the limiting factor for maximum topology size. The NIx–Vector routing method can process up to 330 campus networks (177, nodes) within this limit, where the static routing method can only achieve 40 campus networks (21,000 nodes). The single gateway optimization with static routing shows an improve- ment over plain static routing, achieving a maximum size of 150 campus networks (80,000 nodes).

5 Summary

We have demonstrated experimental results showing that careful attention to event list management and memory man- agement in a network simulation can lead to significant im- provements in the overall topology size achievable in a sin- gle simulation execution. We achieved a topology size of 177,000 nodes in a single simulation address space on an inexpensive workstation with 2Gb of main memory, repre- senting a factor of 8 improvement over the size limit without our optimizations. This enables multi–million node simula- tions using distributed simulation methods on a network of workstations.

ACKNOWLEDGMENTS

This research was sponsored in part by NSF Grants Nos. ANI-9977544, ANI-0225417, ECS-0225471, and DARPA Contract number N66002-00-1-8934. The content of this publication does not necessarily reflect the position or the policy of the sponsors and no official endorsement should be inferred.

REFERENCES

Bagrodia, R., R. Meyer, M. Takai, Y. Chen, X. Zeng, J. Mar- tin, B. Park, and H. Song. 1998, October. Parsec: A par- allel simulation environment for complex systems. IEEE Computer 31 (10): 77–85. Bertolotti, S., and L. Dunand. 1993, October. Opnet 2.4: an environment for communication network modeling and simulation. In Proceedings of the European Simulation Symposium. Brown, R. 1988. Calendar queues: A fast o(1) priority queue implementation for the simulation event set problem. In Communications of the ACM , Volume 31, 1220–1227. Cowie, J., H. Liu, J. Liu, D. Nicol, and A. Ogielski. 1999, June. Towards realistic million-node internet simulations. In International Conference on Parallel and Distributed Processing Techniques and Applications. Cowie, J., A. Ogielski, and D. Nicol. 2002. The SSFNet network simulator. Software on-line: http://www.ssfnet.org/homePage.html. Renesys Cor- poration. Cowie, J. H., D. M. Nicol, and A. T. Ogielski. 1999, January. Modeling the global internet. Computing in Science and Engineering.

IEEE 2000. Ieee standard 802-3 carrier sense multiple access with collision detection(CSMA/CD) access method with physical layer specifications. Institute of Electrical and Electronic Engineers. Johnson, D. B., and D. A. Maltz. 1996. Dynamic source rout- ing in ad hoc wireless networks. Mobile Computing :153–

McCanne, S., and S. Floyd. 1997. The LBNL network simulator. Software on-line: http://www.isi.edu/nsnam. Lawrence Berkeley Laboratory. Nicol, D. M. 2002. The baseline campus network explained. http://www.cs.dartmouth.edu/ nicol/NMS/baseline/. DARPA Network Modeling and Simulation (NMS). Perkins, C. E., and E. M. Royer. 1999, Feb. Ad hoc on- demand distance vector routing. In Proceedings of the 2nd IEEE Workshop on Mobile Computing Systems and Appli- cations , 90–100. Postel, J. 1980a, Jan. Internet RFC760: Dod standard internet protocol. Network Working Group. Postel, J. 1980b, Jan. Internet RFC761: Dod standard trans- mission control protocol. Network Working Group. Riley, G. F. 2003, Aug. The georgia tech network simula- tor. In Proceedings of Workshop on Models, Methods, and Tools for Reproducible Network Research (MoMeTools) (to appear). Riley, G. F., and M. H. Ammar. 2002, January. Simulating large networks: How big is big enough? In Proceedings of First International Conference on Grand Challenges for Modeling and Simulation. Riley, G. F., M. H. Ammar, and R. M. Fujimoto. 2000, Au- gust. Stateless routing in network simulations. In Proceed- ings of the Eighth International Symposium on Modeling, Analysis and Simulation of Computer and Telecommuni- cation Systems. Riley, G. F., R. M. Fujimoto, and M. H. Ammar. 1999, Oc- tober. A generic framework for parallelization of network simulations. In Proceedings of Seventh International Sym- posium on Modeling, Analysis and Simulation of Com- puter and Telecommunication Systems (MASCOTS’99). Tyan, J.-Y., and C.-J. Hou. 2001, Jan. Javasim: A component- based compositional network simulation environment. In Proceedings of the Western Simulation Multiconference, Communication Networks And Distributed Systems Mod- eling And Simulation. Wu, H., R. Fujimoto, and G. Riley. 2001, Dec. Experiences parallelizing a commercial network simulator. In Proceed- ings of the Winter Simulation Conference. Zeng, X., R. Bagrodia, and M. Gerla. 1998, May. GloMoSim: a library for parallel simulation of large-scale wireless net- works. In Proceedings of the 12th Workshop on Parallel and Distributed Simulation.

AUTHOR BIOGRAPHY

GEORGE F. RILEY is an Assistant Professor of Electrical and Computer Engineering at the Georgia Institute of Tech- nology. He received his Ph.D. in computer science from the Georgia Institute of Technology, College of Computing, in August 2001. His research interests are large–scale simu- lation using distributed simulation methods. He is the de- veloper of Parallel/Distributed ns2 ( pdns ), and the Georgia Tech Network Simulator ( GTNetS ). He can be reached via email at [email protected].