Set up a load generator environment
Follow the guidelines below to set up the environments of your load generators.
-
In general, you should always make sure to configure the load generator machine the same as the machine upon which you recorded or prepared the script or test.
-
For Java scripts and JUnit tests, verify that the script or test dependencies are available on the load generator machine with the same paths defined in the classpath Runtime Settings. You can do this in a few ways, for example, by mapping network drives or manually copying files.
-
For NUnit tests, make sure that the NUnit framework is installed on the load generator machine in the same path as the Controller machine. The framework version should be the same as the one used to build the script in Visual Studio.
-
For Linux machines, make sure to configure the environment variables as described in Linux environment variables.
-
Load generator optimization. For load generators that are installed on dedicated machines, you can configure the system setup for load generator optimization when necessary.
Caution: It is recommended to always use default load generator settings. The impact of making changes to these settings for load generator optimization are described below.
Optimization Description and impact Increase number of available ports Determines the highest port number that TCP can assign when an application requests an available user port from the system. Typically, ephemeral ports (those used briefly) are allocated to port numbers 1024 through 5000.
Impact: Increasing the value enables the operating system to use a larger port range, resulting in a larger number of concurrent TCP connections.
Run the following from the command prompt:
- Windows: netsh int ipv4 set dynamicport tcp start=1025 num=64510
- Linux: sysctl -w net.ipv4.ip_local_port_range="1024 65535"
Increase number of maximum open files (Linux only) Additional configuration to support increase in number of available ports on Linux:
- Edit file /etc/security/limits.conf.
-
Add the following lines:
root soft nofile 65535 root hard nofile 131070
Shorten TCP connection “wait time” Determines the time that must elapse before TCP can release a closed connection and reuse its resources.
Reducing the value of this entry allows TCP to release closed connections faster, providing more resources for new connections.
Impact: If the value is too low, TCP might release connection resources before the connection is complete, requiring the server to use additional resources to reestablish the connection.
-
Windows: Edit the Windows registry:
-
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters
- Value: Set TcpTimedWaitDelay to 5
-
-
Linux: Run the following from the command line:
sysctl -w net.ipv4.tcp_fin_timeout=5