I am wondering if there is a way to know how many threads JMeter can support for a given machine configuration? Currently, I am working toward a task that requires me to check how many VMs I need to support different API threads.
There is one: measure it.
- Make sure to follow JMeter Best Practices
- Make sure to set up monitoring of baseline OS health metrics like CPU, RAM, Network, Disk usage, etc. If you don't have better options you can consider using JMeter PerfMon Plugin for this.
- Start with 1 user and gradually increase the load at the same time looking at resources consumption
- When any of the monitored metrics starts exceeding i.e. 80% of maximum available capacity stop the test and record how many threads (virtual users) were online at very that moment. You can check it using i.e. Active Threads Over Time Listener)
This is how many users you can simulate from particularly this machine for particularly this test, if you change machine or .jmx test script - you will need to repeat the measurement.
There is no straightforward answer to determine the number of threads that JMeter can support for a given machine configuration. The number of threads that can be supported depends on various factors, including:
- Machine Configuration: Processor type, RAM, and available disk space
- Network Configuration: Network Bandwidth, Latency, and JVM network configuration.
- Test Scenario: Number of requests, type of requests, size of requests and response.
- Test Configuration: Number of loops, ramp-up time, think time, etc.
- JMeter Configuration: JVM memory allocation, Garbage collection settings, etc.
To determine the number of threads that a machine can support, you can perform load testing using JMeter and monitor the performance of the system under different load conditions. You can increment the number of threads until you reach the maximum capacity of the system. This is commonly referred to as the maximum throughput that a system can support.