I have a performance test in JMeter
and would like to test maximum system performance/throughput with it. So number of active threads should be increased for example while Error rate is under 2 %. I found Constant Throughput Timer
, put it into Thread Group
but it only pause or slow down threads. I tried define it as follows, with a property: ${__P(throughput,)}
, but not sure what should be correct value for this property. I can't see how JMeter could measure system maximal performance.

- 5,189
- 19
- 91
- 181
-
Possible duplicate of [Change the thread count of test plan in JMeter, at run time](https://stackoverflow.com/questions/10312281/change-the-thread-count-of-test-plan-in-jmeter-at-run-time) – Ori Marko Nov 24 '17 at 18:42
-
1@user7294900 : There isn't any exact solution on this question. – plaidshirt Nov 24 '17 at 21:28
-
Can you share if and how you succeeded to achieve it? – Ori Marko Dec 06 '17 at 15:28
-
@user7294900 : Please check accepted answer, it helps. – plaidshirt Dec 07 '17 at 07:11
2 Answers
There is no Out of the box solution as of JMeter 3.3, see this enhancement request:
Still it is possible to dynamically add threads since JMeter 3.2 (see https://bz.apache.org/bugzilla/show_bug.cgi?id=60530) in a JSR223 Test Element using JMeterContext:
ctx.getThreadGroup().addNewThread(delay, ctx.getEngine());
So based on this, you could in a JSR223 Test Element (Pre/Post Processor or Sampler) check the presence of a file in a folder of your choice named :
NUMBER_OF_THREAD_TO_ADD.txt
If present, use its name to compute number of threads and call this method.

- 33,980
- 5
- 71
- 116
-
-
1I updated my answer. You can select whatever folder you want since it will be your code that will use this folder – UBIK LOAD PACK Nov 28 '17 at 16:56
There is no such functionality in the "vanilla" JMeter howere it is possible with plugins, check out:
They can be connected together via feedback loop so Concurrency Thread Group will add more threads if needed to reach the desired number of requests per second.
You can install both the plugins (and keep them up-to-date) using JMeter Plugins Manager

- 159,985
- 5
- 83
- 133
-
Thanks! How is it possible to connect these with error rate? So how could I increase number of threads since error rate is below a predefined value? – plaidshirt Nov 29 '17 at 07:23
-
1Not sure regarding stopping increasing load, however you can stop the whole test if errors rate exceeds certain threshold via [AutoStop Listener](https://www.blazemeter.com/blog/using-the-jmeter-autostop-listener-how-to-do-it-right) – Dmitri T Nov 29 '17 at 09:14