In most real world web application environments the machine running the web
application is not the machine which is sitting on your desk. However to get a
true estimate of performance you would like to be measuring the true response
time of your server, not any (highly variable) network bottle-necks that might
exist between you and the machine on which your web application is running. At
the same time using a GUI especially a Java GUI over the network is at best
painful (using Un*x and X) and at times not possible (using windows).
To solve this problem JMeter provides a client-server architecture for load
and performance testing which allows the JMeterEngine (the tester) to reside
and run on your application server while the configuration GUI and visualization
executes on the development machine. This offers a number of features:
-
True performance measurment without network bottlenecks
-
Fast responsive GUI
-
Saving of test samples to a local machine
-
Managment of multiple JMeterEngines from a single machine
Step 1: Start the RMI Registry
JMeter uses Remote Method Invocation (RMI) as the remote communication mechanism. Therefore, you need
to run the RMI Registry application (which is named, "rmiregistry") that comes with the JDK and is located in the "bin"
directory. Before running rmiregistry, make sure that the following jars are in your system claspath:
-
JMETER_HOME/lib/ext/ApacheJMeter_core.jar
-
JMETER_HOME/lib/jorphan.jar
-
JMETER_HOME/lib/logkit-1.0.1
The
rmiregistry application needs access to certain JMeter classes. Run rmiregistry with no parameters. By default the
application listens to port 1099.
Step 2: Start the JMeter Server
Once the RMI Registry application is running, start the JMeter Server.
Use the "-s" option with the jmeter startup script ("jmeter -s").
Step 3: Add the server IP to your client's Properties File
Edit the properties file
on the controlling JMeter machine
. In /bin/jmeter.properties, find the property named, "remote_hosts", and
add the value of your running JMeter server's IP address. Multiple such servers can be added, comma-delimited.
Step 4: Start the JMeter Client
Now you are ready to start the controlling JMeter client. For MS-Windows, start the client with the script "bin/jmeter.bat". For UNIX,
use the script "bin/jmeter". You will notice that the Run menu contains two new sub-menus: "Remote Start" and "Remote Stop"
(see figure 1). These menus contain the client that you set in the properties file. Use the remote start and stop instead of the
normal JMeter start and stop menu items.
Figure 1 - Run Menu