Skip to main content
Back to blog
tutorials 24 October 2020 2 min read

JMeter (Master/Slave)

Learn how to configure Apache JMeter in a distributed master/slave architecture on Debian GNU/Linux 10, enabling load distribution across multiple servers in both GUI and headless modes.

M

Mark

Performance Testing Expert

Apache JMeter supports distributed testing through master/slave configuration, allowing load distribution across multiple servers. The setup can run via the graphical interface or in headless mode.

Installation Steps

Step 1: Java Installation

Download JDK 13.0.2 and install it via DEB package. Configuration includes:

  • Installing the package with dpkg
  • Updating system alternatives for java, jar, and javac commands
  • Setting environment variables in /etc/profile.d/jdk.sh for JAVA_HOME, J2SDKDIR, and DERBY_HOME paths
# Install JDK package
sudo dpkg -i jdk-13.0.2_linux-x64_bin.deb

# Update alternatives
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-13.0.2/bin/java 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-13.0.2/bin/jar 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-13.0.2/bin/javac 1

Create the environment variables file:

# /etc/profile.d/jdk.sh
export JAVA_HOME=/usr/lib/jvm/jdk-13.0.2
export J2SDKDIR=/usr/lib/jvm/jdk-13.0.2
export DERBY_HOME=/usr/lib/jvm/jdk-13.0.2/db
export PATH=$PATH:$JAVA_HOME/bin

Step 2: JMeter Installation

Download Apache JMeter 5.3 and extract it:

wget https://mirrors.ukfast.co.uk/sites/ftp.apache.org//jmeter/binaries/apache-jmeter-5.3.zip
unzip apache-jmeter-5.3.zip

Step 3: Host Configuration

Configure network settings by identifying machine IP addresses and updating /etc/hosts with hostname-to-IP mappings on all machines (master and slaves).

# Example /etc/hosts entries
192.168.1.100 jmeter-master
192.168.1.101 jmeter-slave-1
192.168.1.102 jmeter-slave-2

Step 4: JMeter Properties Configuration

Edit jmeter.properties to specify slave IP addresses:

remote_hosts=xxx.xxx.xxx.xxx,xxx.xxx.xxx.xxx

Step 5: Certificate Generation

Execute create-rmi-keystore.sh on the master server to generate encryption certificates. The resulting rmi_keystore.jks file must be distributed to all slave servers.

./create-rmi-keystore.sh

Step 6: Start Slave Servers

Launch JMeter server on each slave with jmeter-server, which initializes RMI connections with SSL encryption.

./jmeter-server

Step 7: Execute Master Test

Run distributed tests from the master:

jmeter -n -t examples/PerformanceTestPlanMemoryThread.jmx -r

The master orchestrates test execution across configured slave nodes and aggregates results.

Key Technical Details

  • Java version requirement: JDK 13.0.2
  • JMeter version: 5.3
  • Operating system: Debian GNU/Linux 10 (Buster)
  • Communication protocol: RMI with SSL encryption
  • Execution mode: Headless/command-line

Further Reading

Tags:

#jmeter #distributed-testing #performance-testing #linux #debian

The cheat sheets, as printable PDFs

All 52 are free to read on the site — no signup. Want them as A4 PDFs you can actually print? The pack covers JMeter, k6, Gatling, Docker, Kubernetes and observability, and costs nothing but an email address.

Get the PDF pack

Delivered by email. Unsubscribe any time — see our privacy policy.

Stuck on this in your own test suite?

I take on fixed-price, fixed-turnaround performance work — script migrations, HAR-to-script conversion and written performance audits. No calls required.

Get in Touch