Basically Distributed Load Test with JMeter

Hello, today I will share my personal notes on how I perform basically distributed load test with JMeter.

Firstly I created 3 Slave and 1 Master droplets on Digital Ocean. All droplets must be in the same local network because these droplets need to communicate with each other on different ports.

On Slave droplets

Installation
wget https://kozyatagi.mirror.guzel.net.tr/apache//jmeter/binaries/apache-jmeter-5.4.1.tgz
apt install default-jdk && apt install default-jre
tar -xzvf apache-jmeter-5.4.1.tgz
Config
nano /apache-jmeter-5.4.1/bin/jmeter.properties
CTRL + W: Set this if you don't want to use SSL for RMI
server.rmi.ssl.disable=true

On Master droplet

Installation
wget https://kozyatagi.mirror.guzel.net.tr/apache//jmeter/binaries/apache-jmeter-5.4.1.tgz
apt install default-jdk && apt install default-jre
tar -xzvf apache-jmeter-5.4.1.tgz
Config
nano /apache-jmeter-5.4.1/bin/jmeter.properties
CTRL + W: remote_hosts
remote_hosts=192.168.1.1,192.168.1.2,192.168.1.3

The following lines can be added to jmeter.properties on all machines to output the load test results as a neat .CSV file.

nano /apache-jmeter-5.4.1/bin/jmeter.properties
jmeter.save.saveservice.output_format=csv
jmeter.save.saveservice.data_type=false
jmeter.save.saveservice.label=true
jmeter.save.saveservice.response_code=true
jmeter.save.saveservice.response_data.on_error=false
jmeter.save.saveservice.response_message=false
jmeter.save.saveservice.assertion_results_failure_message=false
jmeter.save.saveservice.successful=true
jmeter.save.saveservice.thread_name=true
jmeter.save.saveservice.time=true
jmeter.save.saveservice.subresults=false
jmeter.save.saveservice.assertions=true
jmeter.save.saveservice.latency=true
jmeter.save.saveservice.bytes=true
jmeter.save.saveservice.hostname=true
jmeter.save.saveservice.thread_counts=true
jmeter.save.saveservice.sample_count=true
jmeter.save.saveservice.timestamp_format=HH:mm:ss
jmeter.save.saveservice.default_delimiter=;
jmeter.save.saveservice.print_field_names=true
jmeter.save.saveservice.autoflush=true

How to start load test?

On Slave droplets

Run the following command on all slave droplets. Now the slave droplets are ready to be managed with the master.

./jmeter-server -Djava.rmi.server.hostname=192.168.1.1 -Dserver.rmi.localport=1099
./jmeter-server -Djava.rmi.server.hostname=192.168.1.2 -Dserver.rmi.localport=1099
./jmeter-server -Djava.rmi.server.hostname=192.168.1.3 -Dserver.rmi.localport=1099
On Master droplet

Run the following command on master droplet to start the load test.

./jmeter.sh -n -t "/root/LoadTestScenario.jmx" -l "result.csv" -R 192.168.1.1:1099,192.168.1.2:1099,192.168.1.3:1099

References:

Apache JMeter Distributed Testing Step-by-step

Automatically generating nice graphs at end of your Load Test with Apache JMeter and JMeter-Plugins

0x039

Bir Cevap Yazın

Aşağıya bilgilerinizi girin veya oturum açmak için bir simgeye tıklayın:

WordPress.com Logosu

WordPress.com hesabınızı kullanarak yorum yapıyorsunuz. Çıkış  Yap /  Değiştir )

Google fotoğrafı

Google hesabınızı kullanarak yorum yapıyorsunuz. Çıkış  Yap /  Değiştir )

Twitter resmi

Twitter hesabınızı kullanarak yorum yapıyorsunuz. Çıkış  Yap /  Değiştir )

Facebook fotoğrafı

Facebook hesabınızı kullanarak yorum yapıyorsunuz. Çıkış  Yap /  Değiştir )

Connecting to %s

WordPress.com'da bir web sitesi veya blog oluşturun

Yukarı ↑

%d blogcu bunu beğendi: