TUNING PURELOAD

Tuning OSs for PureLoad Usage

Normally there are no need for any tuning of the Operating System where you run PureLoad, but this document describes a few areas where it might be necessary per OS for larger tests.
For additional information and hint of how to configure you platform for extreme load testing, please contact support@pureload.com

Network Connections

If you are using a lot of workers and/or worker threads you might be running out of client TCP/IP connections. The reason for this could be that the worker machine:

• is out of available connections/ports
• is running out of file descriptors (UNIX)

The reason for running out of available ports is that if you create a lot of connections at a rapid rapid rate, the system does not have enough time to clean up the TIME_WAIT sockets. Eventually you might run out of available ports.

Windows

The Windows TCP/IP layer has a registry setting TcpTimedWaitDelay that controls the time a connection is in TIME_WAIT state and a setting MaxUserPort that controls the range of dynamically allocated ports. We recommend that you change these to:

• TcpTimedWaitDelay: 30 seconds (default is 240)
• MaxUserPort: 65534 (default is 5000)

For more details how to change these, search Microsoft on-line documentation for your Windows version.

Linux

On a Linux system it's harder to change the TCP TIMED_WAIT setting, instead you should increase the available number of ports.

The /proc/sys/net/ipv4/ip_local_port_range defines the local port range that is used by TCP and UDP traffic to choose the local port. You will see in the parameters of this file two numbers: The first number is the first local port allowed for TCP and UDP traffic on the server, the second is the last local port number. You may change its default parameters to 1024-65535.

Edit the /etc/sysctl.conf file and add the following line:

# Allowed local port range
net.ipv4.ip_local_port_range = 1024 65535


You must restart your network for the change to take effect.

File Descriptors

If you are running PureLoad on a UNIX system you might begin to receive exceptions that is caused by that the file descriptor limit of your system is being exceeded. You can examine the current setting of the file descriptor limit using the limit/ulimit command. Use the following csh shell command to increase the file descriptor limit to (for example) 1024:

% limit descriptors 1024

Use the following sh or ksh shell commands to increase the file descriptor limit to (for example) 1024:

% ulimit -n 1024

Other shells will have similar commands to allow you to increase the file descriptor limit. For a more permanent means to modify your operating system file descriptor limit, check your operating system documentation.

Solaris

To increase number of file descriptors allowed per process use the ulimit or limit command in the shell you are using (see above) to start manager and tasks space server. To be able to increase number of file descriptors to more than 1024, you must modify the /etc/system file:

# set hard limit on file descriptors
set rlim_fd_max = 4096
# set soft limit on file descriptors
set rlim_fd_cur = 1024


These settings will increase the default to 1024 with a max limit of 4096.
Note: The system must be rebooted to initiate changes in /etc/system.

Linux

To increase number of file descriptors allowed per process (1024 is the default on recent Linux kernels). Use the ulimit or limit command in the shell you are using (see above) to start manager and tasks space server. To be able to increase number of file descriptors to more than 1024, follow the instructions below:

Step 1. Allow users to increase their file descriptor limits by changing the following configuration files:
In /etc/security/limits.conf, add the lines:

* soft nofile 1024
* hard nofile 4096

In /etc/pam.d/login, add:

session required /lib/security/pam_limits.so

Step 2. Increase the system-wide file descriptor limit by adding the following three lines to the /etc/rc.d/rc.local startup script:

# Increase system-wide file descriptor limit.
echo 4096 > /proc/sys/fs/file-max
echo 16384 > /proc/sys/fs/inode-max

As an alternative method, recent Red Hat releases allow you to put the configuration changes into the /etc/sysctl.conf file with:

# Increase system-wide file descriptor limit.
fs.file-max = 4096
fs.inode-max = 16384