The process of simulating hundreds of virtual users and collecting their
statistics requires considerable computing power. In order to simulate
enough users to fully load a sophisticated web server configuration, more
than one computer will be required. Web Performance TrainerTM
allows multiple playback engines to cooperate to generate large amounts
of load.
The Web Performance TrainerTM Playback Engine is
a subset of the Web Performance TrainerTM software
that runs only the components required to playback business cases. It
has a limited user interface (text output only) primarily intended for
reporting errors. Because there is no complex user interface running,
a dedicated playback engine makes most efficient use of computing resources
for generating virtual users. It also allows the engine to run on headless
workstations, such as a Unix platform without X Windows. Used in this
way, one computer running Web Performance TrainerTM
will be used to control multiple Web Performance TrainerTM
Playback Engines. The engines will generate load against the web server
and report the resulting statistics back to Web Performance TrainerTM.
Starting a Playback Engine
Starting a playback engine is similar to starting Web Performance TrainerTM. On Windows platforms, there is a menu item labeled
"playback engine" in the same location as the item for starting
Web Performance TrainerTM. This will start a console
window. When the playback engine has finished initialization, a message
will appear in the console window reading "Playback Engine started."
Entering "quit" in the console window will stop the playback
engine and close the window.
The Web Performance TrainerTM is started on Linux,
Solaris and Unix platforms by passing the 'engine' parameter to the normal
startup script:
Connecting to a Playback Engine
Once the playback engines have been started, they will automatically
be discovered by Web Performance TrainerTM and
displayed in the "Playback Engines" section at the bottom of
the Playback Tab. However, there are certain network configurations that
prevent Web Performance TrainerTM from auto-discovering
the engines. When this occurs, the following procedure can be used to
manually connect the playback engines:
When the playback tab in Web Performance TrainerTM
is selected, the Edit menu will show an item labeled "Add Playback
Engine". Selecting this menu item will show the "Add Playback
Engine" dialog box. Enter the hostname or IP address of the computer
on which the playback engine is running into this dialog and press the
OK button.
If Web Performance TrainerTM connects successfully
to the playback engine, the engine will appear in the "Playback Engines"
section at the bottom of the Playback tab:
Running a Test on Multiple Engines
Running a test on multiple playback engines is similar to running a
test with only the local engine. When a test is started, Web Performance
TrainerTM will automatically allocate new virtual
users to the playback engines and collect the statistics from those engine
when the test completes. However, due to the additional work that Web
Performance TrainerTM must perform to coordinate
and monitor multiple playback engines, the local playback engine ("localhost")
will not be automatically added to the playback engine list. You may override
this option by using the Add Playback Engine dialog to manually add the
local engine.
Runtime Feedback
While the test is running, Web Performance TrainerTM
will show the number of users that have been allocated to each engine
as well as an estimate of how many users the engine is capable of supporting.
In general, this estimate is not very accurate when there are only a few
users running but becomes very accurate as the capacity of the engine
is reached. The engines also monitor their memory and processor usage.
These parameters are reported as a percent utilization as well all as
a text description (Normal, High etc.).
More detailed statistics and errors, such as those shown on the Statistics
tab, are gathered from remote engines at 1-minute intervals.
Virtual User Load Balancing
When a new virtual user is allocated, Web Performance TrainerTM
will determine which engine should run that virtual user. If either the
CPU or memory utilization of the engine has exceeded the 'normal' range
(80%) then that playback engine will not be a candidate for receiving
another virtual user until the parameter returns to the normal range.
After eliminating these engines, Web Performance TrainerTM will allocate
the virtual user to the remaining engine with the lowest number of virtual
users.
Firewalls
When a Web Performance TrainerTM
playback engine must be located behind a firewall or is on a machine running
firewall software, you must make certain ports available to allow communication
between the controller and the engine.
The first port is a lookup port. It
is always port number 1099. This port is used by the controller to locate
the engine. This
port must be open on a local firewall. If the engine computer is on a
separate machine from the firewall, this port must be forwarded to the
engine.
The second port is a communication port. Under
normal conditions, it is randomly selected at runtime (to lessen the chances
of port conflicts). When
using the engine through a firewall, this port must be fixed to a known
number. This
is accomplished by editing the "trainer.cfg" configuration file
in the Web Performance Trainer TM
installation folder on the engine. The following line should be edited
(or added):
EngineRMIPort=0
Pick a new port number that is unused on the computer (1101, for example)
and enter it on the line above. Save
the configuration file and restart the playback engine. Then
ensure the port is open (or forwarded) on the firewall, as described for
the lookup port.