1
votes

I've just started to play with Jmeter for my performance/load tests and have a basic question despite reading the official documentation. Would be helpful if someone validates my understanding on Threads and Rampup times.

Example 1:

Threads: 4
RampupTime: 0.1
No of requests (test cases): 1000

How does the thread distribution happen above?

Example 2:

Threads: 4
RampupTime: 1
No of requests (test cases): 1000

How does the thread distribution happen above?

My understanding in this case is Jmeter would take 1 second to spin up 4 threads. And the tests that happen to run after a second (let's say from test case 10 onwards) 4 concurrent threads will be hitting 4 different tests? (ie in a concurrent batch of 4) Is this correct?

Please help. I'm a bit confused with the correlation between the above 3 parameters. Any illustration would be much appreciated. Thanks.

1
I am not sure whether you can specify RampupTime less than 1 seconds because if you look into the implementation jmeter.apache.org/api/org/apache/jmeter/threads/… rampup only takes int value so setting up it to 0.1 will be like setting a 0 value - Vikas Madhusudana

1 Answers

3
votes

So for the first question no there is no rampup time for anything less than 1.

Why?

because rampupTime is int anyting less than one is considered 0.

http://svn.apache.org/viewvc/jmeter/branches/doc-v2_3_1/src/core/org/apache/jmeter/threads/ThreadGroup.java?revision=1196285&view=markup#l227

  public void setRampUp(int rampUp) {
                    setProperty(new IntegerProperty(RAMP_TIME, rampUp));
                }

For the second question every 250 milliseconds there is a thread spawned and after one second you will have 4 threads running.

http://svn.apache.org/viewvc/jmeter/branches/doc-v2_3_1/src/core/org/apache/jmeter/engine/StandardJMeterEngine.java?revision=1196285&view=markup#l399

int rampUp = group.getRampUp();
                            float perThreadDelay = ((float) (rampUp * 1000) / (float) numThreads);

Coming back to your understanding of concurrrent batch. NO it is not so, each thread will be independently running for eg if for some unknown reason one of the threads get hung other three will be still running. It is not that they will wait for the first thread to complete to start the second batch of request.