0

I'm trying to generate seasonal load pattern using jmeter but not able to simulate the situation. For example, I would like to have threads with constant request per seconds (say, 60 requests per second) running always in the system. Another thread group is responsible for generating seasonal spikes, say each 10 minutes interval, it will generate 120 requests per second for, say, 5 minutes. So, each 10 minutes interval I will have spike which lasts for 5 minutes. Any scripts or suggestions to simulate this situation will be helpful.

2 Answers2

1

As you are already aware, you would need 2 thread groups to achieve this requirement.

Thread Group 1:

You can use Constant Throughput Timer to maintain the throughput 60 requests / second.

This timer introduces variable pauses, calculated to keep the total throughput (in terms of samples per minute) as close as possible to a give 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.

Thread Group 2:

To create seasonal spike, Ultimate Thread Group might be a good choice or We can also use the regular thread group with Constant Timer to simulate 10 minutes interval & Startup Delay property of the thread Group to give initial delay if any.

To generate load only for 5 minutes, use Runtime Controller. You would need another Constant Throughput Timer to maintain the throughput of 60 requests / second in this thread group.

vins
  • 15,030
  • 3
  • 36
  • 47
0
  1. Make your Thread Groups to run Forever or select desired duration using "Scheduler" option:

    Thread Group Configuration

  2. In 1st Thread Group add Constant Throughput Timer and configure it as follows:

    • Target Throughput: 3600 (60 requests per second * 60 seconds in minute)
    • Calculate Throughput based on: I believe the best value would be all active threads in current thread group
  3. In 2nd Thread Group add Throughput Shaping Timer and configure it like:

    Throughput shaping timer

    You can use different ramp-up and ramp-down figures, the graph will change to represent your load pattern.

Remember that both timers don't kick off any extra threads so you will have to provide enough threads on Thread Group level in order to create and maintain desired load.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133