Simulating Large Networks

 



 

Overview

 

AdventNet Simulation Toolkit currently simulates 50,000+ device agents in one Linux box and 10,000 device agents in Windows. The aim of this topic is to explore the capabilities of Simulation Toolkit to simulate a large network with ease at the shortest possible time.

 

Linux-based systems can provide  significant simulation speedup and performance improvements over windows. Scripts to configure Virtual IPs in bulk in Linux OS, is also provided with the toolkit.  MySQL provides better performance in Linux than in Windows. Hence, to simulate large networks, we prefer and also recommend you to use Linux OS.  

 

In this topic, you will learn how to use the toolkit to create a large network with 50000 SNMP manageable devices in one Linux box. The scaling tips that can be followed while configuring a very large network is covered in the topic.

 

System Requirements  

 

Configuration of the system where Simulation Toolkit is running :The optimal system requirements are given below:

 

Hard Disk  : 40 GB

RAM : 512 MB (The actual requirement depends on the amount of data queried)

OS : Linux 7.2    

 

Configuration of the system where MySQL and Manager application is running : This is the machine where the simulated data of the devices are stored.

 

Hard Disk  : 40 GB

RAM : 512 MB

OS : Linux 7.2    

 

Changing the System Settings in Linux

 

When running on Linux 2.2 kernels, each process is limited by default to 1024 file descriptors. A file descriptor is an object that a program uses to read or write an open file, or open network socket.

 

For simulating 50000 nodes, increase the maximum file descriptors per process as per the steps given below: You should log in as root to edit the configuration files. The steps given below, will guide through the configuration process.

 

    1. In /etc/security/limits.conf, add the lines :

 

* soft nofile  102400

* hard nofile  409600

 

Note: Hard limit on the number of files is the maximum number of file descriptors per process.

 

Conditions : 1.The Soft limit should be less than hard limit ( we used soft limit = hardlimit / 4 for testing ).

2. Entry "soft nofile 102400" says that soft limit on the number of open files is 102400.

3. Entry "hard nofile 409600" says that hard limit on the number of open files ( maximum ) is 409600.

  1. In /etc/pam.d/login, add the following  line :

session required /lib/security/pam_limits.so

  1. Add the following line in the /etc/sysctl.conf file  :

# Increase system-wide file descriptor limit.

fs.file-max = 102400

fs.inode-max = 409600

 

Note:

fs.file -max = maximum limit on the number of file descriptors.

fs.inode- max = maximum number of inodes .

Condition fs.inode-max = 4 * fs.file-max.

  1. Add the following lines in /root/.bashrc

ulimit -n 409600

 

Note: In this file the above value should be specified inside the IF condition.

  1. Reboot the machine for this settings to take effect.

 

Creating and Adding Devices to the Network

 

A network with 50000+ devices can be created using the Network Designer tool.

Setting Optimum Heap size

 

For enhanced network performance, you can set an optimum heap size of the JVM based on the number of OIDs registered. By default, the network simulator sets the default heap size of the simulator as 200M. For a 50000 node network you can set the heap size as 1600M.

 

If the network is started from Network Designer UI, the heap size can be set as follows:

 

- Edit NetworkDesigner.bat/sh file in <SimulatorHome>/bin directory. By default, the heap size of the simulator as 200M. Edit this file to set the heap size as 1600M.

 

For example,  to set the heap size as 1600M, replace "java -mx200M" with "java -mx1600M".

 

If the network is started from command line, the heap size can be set as follows:

 

Open the StartNetwork.sh present under the <simulator home>/bin/cmdline directory and edit the -mx value as 1600M. By default it will be 200M.

 

Starting the Network  

           

The Network that is designed through the Network Designer can be started from the UI or started from the command line.

 

Starting the network From UI :

 

Advantages of Starting the network from UI :

 

1. Configure traps, behavior scripts and traps at runtime.

2. Option to Stop and Start individual agents in the network.

3. View the properties of a network and individual devices in the network.

4. Delete a device from the network.

 

To start the network from UI select Run -> Start Network option.

 

Starting the network From Command Line :

 

To start the network from command line :

 

$ Sh StartNetwork -net samplenetwork.net -m <specify debug level as 1 or 2> -l <to log the messages>

 

Note: The virtual ip address assigned to the devices are dynamically configured in your system, when starting each agent instance in the network.

 

 

Packaging and Installing the Network

 

The Network Designer also provides option to package and install the network you have created in any other system having Simulation Toolkit.  Refer to the section "Porting your network" to learn more about the package and install options.

 

The network ported to another system can be started right away after doing the following changes :

 

1. Configuring the Virtual IP in the system.

2. Modifying the Virtual IP in the network using the Bulk Modification option.

 

Performance of the Network

 

Refer to the Performance Guide , to learn about the performance statistics of the Network Simulator.



Copyright © 1996-2006, AdventNet Inc. All Rights Reserved.