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.
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.shfor 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: