Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

Configuring JMeter as a Distributed Load Generator on Ubuntu

Tech May 12 2

This guide covers setting up JMeter on Ubuntu to function as a remote load generator for distributed load testing.

Directory Setup and Download

Create a dedicated directory for JMeter installation:

mkdir -p /opt/jmeter
cd /opt/jmeter

Download the latest JMeter tarball from the Apache web site and transfer it to the server. Extract the archive:

tar xvf apache-jmeter-5.3.tgz

Environment Configuration

Configure the system environment variables to make JMeter accessible from any termianl session. Open the shell configuration file:

vim ~/.bashrc

Add the following exports at the end of the file:

# JMeter environment configuration
export JMETER_HOME=/opt/jmeter/apache-jmeter-5.3
export CLASSPATH=.:$JMETER_HOME/lib/ext/ApacheJMeter_core.jar:$JMETER_HOME/lib/jorphan.jar:$JMETER_HOME/lib/logkit-2.0.jar:$CLASSPATH
export PATH=$JMETER_HOME/bin:$PATH

Apply the configuration changes:

source ~/.bashrc

Verify the installation by checking the JMeter version:

jmeter --version

Successful output displays the JMeter version and copyright information.

Remote Test Configuration

To use this machine as a load generator, modify the JMeter properties file located in the bin directory:

cd /opt/jmeter/apache-jmeter-5.3/bin
vim jmeter.properties

Update the following properties to enable distributed testing:

server.rmi.create=true
server.rmi.ssl.disable=true

Starting the Load Generator

Retrieve the server's IP address using:

ip addr show

Start the JMeter server in server mode, binding to the specific IP address:

./jmeter-server -Djava.rmi.server.hostname=192.168.1.100

The server displays a message confirming the remote object creation with the endpoint information.

Master Controller Setup

On the master machine running the JMeter GUI, add the load generator's address to the remote hosts configuration. Open jmeter.properties on the master and configure:

remote_hosts=192.168.1.100:1099

Launch JMeter on the master machine. The configured remote load generator appears in the remote servers list, allowing distributed test execution across multiple machines.

Tags: JMeter

Related Articles

Understanding Strong and Weak References in Java

Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. F...

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.