The number of virtual users you can simulate on one machine varies from several hundreds to several thousands (check out What’s the Max Number of Users You Can Test on JMeter? article for more details) but in any case it is limited.
Each thread (virtual user) has some "footprint" in terms of CPU, RAM, Network and Disk usage. So you need to ensure that the machine you're running JMeter on has enough capacity and it's not overloaded because if JMeter is not capable of sending requests fast enough - you will get false negative results because throughput will be low not due to the application under test problem, but due to the problem with JMeter.
So make sure to monitor essential OS health metrics like CPU, RAM, Network, Disk, Swap usage when you're running a load test. You can do it using i.e. JMeter PerfMon Plugin
If you're able to conduct the required load using only single JMeter machine - running the test in distributed mode doesn't make a lot of sense as you will not get any new results.
However if one machine cannot produce the required load - you will have to conduct distributed testing. The main idea is having multiple JMeter instances executing the same Test Plan.
For example if you identified that you can run only 1000 virtual users on one machine and you need to simulate 3000 ones you will need 4 machines for this.
- Master machine to orchestrate the slaves and collect the results
- 3 slave machines each running 1000 virtual users.
Once you start JMeter Serve ron each slave machine you will be able to run your test in command-line non-GUI mode as follows:
jmeter -n -t your_test_plan.jmx -R IP.of.1st.slave, IP.of.2nd.slave, IP.of.3rd.slave -l result.jtl
if you want to generate HTML Reporting Dashboard after the test run you can do it as follows:
jmeter -n -t your_test_plan.jmx -R IP.of.1st.slave, IP.of.2nd.slave, IP.of.3rd.slave -l result.jtl -e -o /path/to/output/folder