We covered a lot of ground in this chapter. Let us consolidate everything into a quick-reference cheat sheet that you can come back to whenever you need to set up or troubleshoot a distributed test.
| Task | Command |
|---|---|
| Start worker | ./jmeter-server -Djava.rmi.server.hostname=WORKER_IP |
| Start worker with extra memory | JVM_ARGS="-Xmx4g" ./jmeter-server |
| Run on all configured workers | jmeter -n -t test.jmx -r -l results.jtl |
| Run on specific workers | jmeter -n -t test.jmx -R ip1,ip2 -l results.jtl |
| Pass properties to all workers | jmeter -n -t test.jmx -r -Gthreads=500 -Gduration=600 |
| Generate HTML report | jmeter -g results.jtl -o html_report/ |
| Check worker connectivity | nc -zv worker_ip 1099 |
| Stop distributed test gracefully | ./stoptest.sh |
| Kill test immediately | ./shutdown.sh |
| Property | Where to Set | Purpose |
|---|---|---|
| remote_hosts=ip1,ip2,ip3 | Master jmeter.properties | List of worker machine IPs |
| server.rmi.port=1099 | All machines | RMI registry port |
| server.rmi.localport=4000 | All machines | Fixed RMI data port (avoids random ports) |
| server.rmi.ssl.disable=true | All machines | Disable RMI SSL (test env only) |
| java.rmi.server.hostname=IP | Workers with multiple NICs | Force RMI to use specific IP |
| remote.continue_on_fail=false | Master | Stop if a worker is unreachable |
| mode=StrippedBatch | All machines | Optimized result streaming |
Workers = ceil(Target_Users / (Baseline_Per_Machine x 0.75)) + 2 spares
JMX_Thread_Count = Target_Users / Number_of_Workers
Bandwidth_Per_Worker = JMX_Thread_Count x Requests_Per_Sec x Avg_Response_Size
Example: 10,000 users, baseline 1,000/machine, 4 req/sec, 30KB response
Workers = ceil(10,000 / 750) + 2 = 16 workers
JMX threads = 10,000 / 16 = 625
Bandwidth = 625 x 4 x 30KB = 75 MB/s per worker (OK for 1 Gbps NIC)Key Point: Distributed testing transforms a single-machine limitation into a scalable, enterprise-grade performance testing capability. Master the setup once, and you can test any scale.
Key Point: Distributed testing is essential for enterprise-scale load testing. Master the architecture, setup, and troubleshooting -- it is a high-value skill that separates senior testers from beginners.
Answer all 8 questions, then submit to see your score.
1. A JMeter test plan has 500 threads configured. If you run it with 4 remote workers using the -r flag, how many total virtual users will be generated?
2. Which file does the JMeter master distribute to worker machines during a distributed test?
3. What is the difference between the -r and -R flags in JMeter distributed testing?
4. When passing properties to remote workers in JMeter distributed mode, which flag should you use?
5. What is the default port used by JMeter RMI for master-slave communication?
6. You are running a distributed test with 5 workers. Each virtual user makes 3 requests per second, and the average response size is 40 KB. Each worker handles 600 users. What is the bandwidth consumption per worker?
7. After starting a distributed test, you see "javax.net.ssl.SSLHandshakeException" on one worker. What is the most likely cause?
8. Which property should you set to avoid random dynamic RMI ports that complicate firewall configuration?