49
votes

This is the configuration of my test plan thread properties:

Number of Threads (users): 100
Ramp-up Period (in seconds): 10
Loop Count : Forever
Delay thread creation until needed: No
Scheduler: No

I ran the test overnight with the total duration of 14 hours and 7 minutes (approximately 50820 seconds). After loading the jtl file, The number of samples shown in summary report is 1050975. I tried to compute but I can't understand how it came up with that many sample.

If Ramp-up Period is the time taken by JMeter to create the number of threads per iteration and if the duration of the test is 50820 seconds, then I should have 508200 samples only ( 50820/10 * 100 ). I do not know how or if Loop Count affects this.

8
In addition to the answers; I usually set the ramp-up period the same as the number of threads, i.e. add a new thread every second. Just to be sure I'm not doing too much at once.Sherlock
The number of samples is also a function of response time of your samples. So if your samples are served in 0.5 seconds, you will have 2 samples per second. After 10 seconds, all 100 threads will be full throttle and you will be seeing 200 samples per second. And hence higher number of samples in give time duration. I think you are assuming only 1 sample will be requested per second, which is not true.Manish Sapariya

8 Answers

82
votes

The ramp-up in the Thread Group is the time JMeter should take to start the total number of threads. In your situation this means that every 0.1 second a new thread starts giving 100 running threads after 10 seconds. These 100 threads perform your test iterations back-to-back, so after the ramp-up 100 threads run continously for the duration of the test.

32
votes

Ramp-up Period - The time frame (in seconds) for all requests to start. All the threads specified in the Number of Threads input will start within Ramp-up period.

For instance:

100 threads and 100 seconds ramp-up: each second JMeter will start 1 Thread until all threads are started by the time the 100 seconds are up.

100 threads and 50 seconds ramp-up: each second 2 Threads are started.

100 threads and 200 seconds ramp-up: every 2 seconds, 1 Thread is started.

Now,

The sample or request generation is a different concept than Thread generation.In you case, 100 threads were up within 10 seconds.The key factor here is the Throughput. As per JMeter glossary:

Throughput is calculated as requests/unit of time. The time is calculated from the start of the first sample to the end of the last sample. This includes any intervals between samples, as it is supposed to represent the load on the server.

The formula is: Throughput = (number of requests) / (total time).

Here the Number of Executed Samples or Requests are 1050975 and the Test duration is 50820 seconds. So this is related to Throughput.The output 1050975 requests in 50820s mean the Average Throughput throughout your test was approximate 20.5/s.

To take control over Throughput or Transactions per second there are very handy JMeter plugins called Constant Throughput Timer.

Constant Throughput Timer introduces variable pauses, calculated to keep the total throughput (in terms of samples per minute) as close as possible to a given figure. Of course, the throughput will be lower if the server is not capable of handling it, or if other timers or time-consuming test elements prevent it.

12
votes

The ramp-up period tells JMeter how long to take to “ramp-up” to the full number of threads.

@Little Chicken Understanding 1 is correct.

If 10 threads are used, and the ramp-up period is 10 seconds, then JMeter will take 10 seconds to get all 10 threads up and running.

Each thread will start 1 second after the previous thread was begun.

6
votes

For Example

  1. 1000 target threads with 1000 seconds ramp-up: JMeter will add one user each second
  2. 1000 target threads with 100 seconds ramp-up: JMeter will add 10 users each second
  3. 1000 target threads with 50 seconds ramp-up: JMeter will add 20 users each second
4
votes

The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds.

1
votes

Understanding 1: is correct The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun. If there are 30 threads and a ramp-up period of 120 seconds, then each successive thread will be delayed by 4 seconds

1
votes

Ramp up Period: Rate at which the users will be onborded to start the trasaction.

In jMeter, with 10 users if you give a ramp up time of 20, then 1 user will start executing the plan every 2 seconds.

1
votes

This property tells JMeter how long to delay between starting each user.

For example, if you enter a Ramp-Up Period of 5 seconds, JMeter will finish starting all of your users by the end of the 5 seconds. So, if we have 5 users and a 5 second Ramp-Up Period, then the delay between starting users would be 1 second (5 users / 5 seconds = 1 user per second). If you set the value to 0, then JMeter will immediately start all of your users.