JMeter - 2.9 - (Remote Test|Distributed testing)

Card Puncher Data Processing


In distributed testing, JMeter run in server mode on the remote node(s) that are controlled from the client. The client sends the test plan to all the servers. Then each server run it (JMeter does not distribute the load between servers).


  • (Client|Master): the system running Jmeter which controls the slave remote (and doesn't send any request)
  • (Server|Slave|Remote) Node: the system running JMeter in server mod (jmeter-server), which takes commands from the client and send the test plan requests to the target system(s)
  • Target: the server to stress test

Distribution Testing Jmeter

Listeners in the test plan send their results back to the client JMeter which writes the results to the specified files.

Samples are not sent back synchronously by default as they are generated. Since JMeter 2.9, default is MODE_STRIPPED_BATCH, which returns samples in batch mode (every 100 samples or every minute by default). This is to improve the maximum throughput of the server test as otherwise the sample result has to be sent back before the thread can continue.

The MODE_STRIPPED_BATCH strips response data from Sample Result, so if you need it change to another mode. See Sender Mode

JMeter/RMI requires:

  • a connection from the client to the server. Default port 1099.
  • and a reverse connection in order to return results from the server to the client. This will use a high-numbered port controlled by jmeter property “client.rmi.localport”


All the nodes (client and servers):

  • are running the same version of JMeter.
  • are running the same version of Java. For JMeter 2.9, Java 6 runtime or higher
  • have extra test data files available in the appropriate directory
  • are on the same subnet
  • can communicate (the firewalls must be turned off of set up to allow the connections)
  • must be started with the same property (file and command line option)


Remote Servers

Custom jmeter-server script

The script jmeter-server(.bat) is used to run JMeter in remote node. You must modify this script to start JMeter with the same JMeter option.

For instance, to point to a custom user property file, add the –addprop option in the following line:

${DIRNAME}/jmeter ${RMI_HOST_DEF} -Dserver_port=${SERVER_PORT:-1099} -s -j jmeter-server.log --addprop "$@"

Start the server

Start then the JMeter server component script on all server machines:

  • Unix
[oracle@di-obiee-02 bin]$ ./jmeter-server
  • Windows


Created remote object: UnicastServerRef [liveRef: [endpoint:[](local),
objID:[1aaa5703:13e6447841d:-7fff, 2817466081349018584]]]

where the endpoint is the IP with the port 48840. It defines the listening port.

The following processes are started:

/bin/sh ./jmeter -Dserver_port=1099 -s -j jmeter-server.log
java -server -XX:+HeapDumpOnOutOfMemoryError -Xms512m -Xmx512m -XX:NewSize=128m -XX:MaxNewSize=128m -XX:MaxTenuringThreshold=2 -Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000 -XX:PermSize=64m -XX:MaxPermSize=128m -jar ./ApacheJMeter.jar -Dserver_port=1099 -s -j jmeter-server.log


endpoint port

The endpoint port is randomly assigned. If you want to set it up, change the below property

# To use a specific port for the JMeter server engine, define
# the following property before starting the server:

RMI Configuration

Since JMeter 2.3.1, the JMeter server application starts the RMI registry itself; there is no need to start RMI registry separately. To revert to the previous behaviour, define the JMeter property server.rmi.create=false on the server host systems.

By default, RMI uses a dynamic port for the JMeter server engine. This can cause problems for firewalls, so versions of JMeter after 2.3.2 will check for the JMeter property server.rmi.localport . If this is non-zero, it will be used as the local port number for the server engine.

Test the connection

From the client node, use telnet to connect to the process.

telnet   48926
Connected to di-obiee-02.hotitem.local (
Escape character is '^]'.
Connection closed by foreign host.

Check the jmeter-server.log

The log is written in the file: jmeter-server.log

2013/05/02 12:09:48 INFO  - jmeter.util.JMeterUtils: Setting Locale to en_US 
2013/05/02 12:09:48 INFO  - jmeter.JMeter: Loading system properties from: /home/oracle/apache-jmeter-2.9/bin/ 
2013/05/02 12:09:48 INFO  - jmeter.JMeter: Setting System property: server_port=1099 
2013/05/02 12:09:48 INFO  - jmeter.JMeter: Copyright (c) 1998-2013 The Apache Software Foundation 
2013/05/02 12:09:48 INFO  - jmeter.JMeter: Version 2.9 r1437961 
2013/05/02 12:09:48 INFO  - jmeter.JMeter: java.version=1.6.0_35 
2013/05/02 12:09:48 INFO  - jmeter.JMeter: HotSpot(TM) 64-Bit Server VM 
2013/05/02 12:09:48 INFO  - jmeter.JMeter: 
2013/05/02 12:09:48 INFO  - jmeter.JMeter: os.arch=amd64 
2013/05/02 12:09:48 INFO  - jmeter.JMeter: os.version=2.6.32-100.26.2.el5 
2013/05/02 12:09:48 INFO  - jmeter.JMeter: file.encoding=UTF-8 
2013/05/02 12:09:49 INFO  - jmeter.JMeter: Default Locale=English (United States) 
2013/05/02 12:09:49 INFO  - jmeter.JMeter: JMeter  Locale=English (United States) 
2013/05/02 12:09:49 INFO  - jmeter.JMeter: JMeterHome=/home/oracle/apache-jmeter-2.9 
2013/05/02 12:09:49 INFO  - jmeter.JMeter: user.dir  =/home/oracle/apache-jmeter-2.9/bin 
2013/05/02 12:09:49 INFO  - jmeter.JMeter: PWD       =/home/oracle/apache-jmeter-2.9/bin 
2013/05/02 12:09:49 INFO  - jmeter.JMeter: IP: Name: di-obiee-02.hotitem.local FullName: di-obiee-02.hotitem.local 
2013/05/02 12:09:49 INFO  - jmeter.engine.RemoteJMeterEngineImpl: Starting backing engine on 1099 
2013/05/02 12:09:49 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP address= 
2013/05/02 12:09:49 INFO  - jmeter.engine.RemoteJMeterEngineImpl: IP address is a site-local address; this may cause
problems with remote access.
Can be overridden by defining the system property 'java.rmi.server.hostname' - see jmeter-server script file 
2013/05/02 12:09:49 INFO  - jmeter.engine.RemoteJMeterEngineImpl: Creating RMI registry (server.rmi.create=true) 
2013/05/02 12:09:49 INFO  - jmeter.engine.RemoteJMeterEngineImpl: Bound to registry on port 1099 



Define the servers IP

To define the servers IP, you can:

  • Add the value of the servers IP in the “remote_hosts” property

In non-Gui mode:

  • Use the -r command line and -Jremote_hosts={serverlist}
  • Use the -R command line option to specify the remote host(s) to use. E.g. jmeter -Rhost1,,host2
Server Exit after test

If you define the JMeter property server.exitaftertest=true. The server will exit after it runs a single test. See also the -X flag (described below)

Start the client and the test


Start the client with the script

  • For MS-Windows, “bin/jmeter.bat”.
  • For UNIX, “bin/jmeter”.

You will notice that the Run menu contains two new sub-menus:

  • “Remote Start”
  • and “Remote Stop”

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.

Command line

To start the remote server(s) from the command-line use the jmeter command:

jmeter -n -t script.jmx -r


jmeter -n -t script.jmx -R server1,server2...

where you can use the following flag:

  • n to start Jmeter in a non-gui mode
  • t to define the test file
  • r to start the remote server as defined in the JMeter properties file
  • R to define the list of servers and start them
  • -Gproperty=value - define a property in all the servers (may appear more than once)
  • -Z - Exit remote servers at the end of the test.

The command-line client will exit when all the remote servers have stopped.



All configurations, remote server as client are made in the JMeter Properties file under the section “Remote hosts and RMI configuration”.

# Remote hosts and RMI configuration

# Remote Hosts - comma delimited

# RMI port to be used by the server (must start rmiregistry with same port)

# To change the port to (say) 1234:
# On the server(s)
# - set server_port=1234
# - start rmiregistry with port 1234
# On Windows this can be done by:
# On Unix:
# SERVER_PORT=1234 jmeter-server
# On the client:
# - set remote_hosts=server:1234

# Parameter that controls the RMI port used by the RemoteSampleListenerImpl
# Default value is 0 which means port is randomly assigned

# To change the default port (1099) used to access the server:

# To use a specific port for the JMeter server engine, define
# the following property before starting the server:

# From JMeter 2.3.1, the jmeter server creates the RMI registry as part of the server process.
# To stop the server creating the RMI registry:

# From JMeter 2.3.1, define the following property to cause JMeter to exit after the first test

Remote batching

In the JMeter Properties file

# Remote batching configuration
# How is Sample sender implementations configured:
# - true (default) means client configuration will be used
# - false means server configuration will be used

# Remote batching support
# Since JMeter 2.9, default is MODE_STRIPPED_BATCH, which returns samples in
# batch mode (every 100 samples or every minute by default)
# Note also that MODE_STRIPPED_BATCH strips response data from SampleResult, so if you need it change to
# another mode
# Hold retains samples until end of test (may need lots of memory)
# Batch returns samples in batches
# Statistical returns sample summary statistics
# hold_samples was originally defined as a separate property,
# but can now also be defined using mode=Hold
# mode can also be the class name of an implementation of org.apache.jmeter.samplers.SampleSender
#Set to true to key statistical samples on threadName rather than threadGroup
# Value is in milliseconds
# Asynchronous sender; uses a queue and background worker process to return the samples
# default queue size
# DiskStore: as for Hold mode, but serialises the samples to disk, rather than saving in memory

# Note: the mode is currently resolved on the client; 
# other properties (e.g. time_threshold) are resolved on the server.

# To set the Monitor Health Visualiser buffer size, enter the desired value
# monitor.buffer.size=800


Permission denied

[oracle@di-obiee-02 bin]$ ./jmeter-server
-bash: ./jmeter-server: Permission denied

Verify that the script jmeter-server en jmeter have the execute right.

Documentation / Reference

Discover More
Card Puncher Data Processing

Apache is a 100% pure Java desktop application designed to load test client/server software with sample via sampler. is organized by protocols and functionality.

Share this page:
Follow us:
Task Runner