What is the difference between Ramp up time and Synchronization timer

不想你离开。 提交于 2021-02-11 14:19:45

问题


Example:

`1. No of Threads = 100 Ramp-up time = 20, means every 1 second = 5 requests will be processed. Loop Count =1

  1. In the same time: If i will do like below No of Threads = 100 Ramp-up time = 1, Loop Count =1`

And put Synchronization Timer : No of Simulated user to group = 5. In this case as well, J meter process 5 requests at one time.

So what is the different logic between the above 2 concepts.


回答1:


Considering case 1 where the Number of threads = 100, Ramp-up time = 20 and loop count =1. This means that for every one sec 5 threads will be induced. Depending on the time taken for the response the test will run for at least 20 sec or more.

Considering case 2 where the Number of threads = 100, Ramp-up=1, loop count=1 and Adding Synchronization Timer with No of Simulated user to group = 5 A batch of 5 users will be added at once.

Both the tests don't take the same amount of time to complete.

  • In case 1, 5 users are distributed over a period of one sec. i.e. per 0.2 sec one user is added.
  • In case 2, 5 users are added to the active thread in one go.

To know more about Synchronizing Timer

To best understand the difference between the 2 use cases, increase the number of threads to 200 while keeping the remaining parameters as is. Then the difference can be noticed easily.




回答2:


  1. means every 1 second = 5 requests will be processed. Loop Count =1 - this is wrong, JMeter will start 5 threads each second, the processing time depends on application response time. The concurrency (number of requests at the same moment of time) is not guaranteed

    A quote from JMeter documentation:

    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.

    Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen).

    Start with Ramp-up = number of threads and adjust up or down as needed.

    See JMeter Ramp-Up - The Ultimate Guide article for more comprehensive explanation.

  2. Synchronizing Timer guarantees that 5 requests will be executed at the same moment so in your 2nd scenario it would be sending requests in "batches" of 5. Normally people go for Synchronizing Timer to do some form of Spike Testing



来源:https://stackoverflow.com/questions/65883520/what-is-the-difference-between-ramp-up-time-and-synchronization-timer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!