Rampup calculation in jmeter

huangapple go评论55阅读模式
英文:

Rampup calculation in jmeter

问题

如何在JMeter中计算Ramp-up时间

测试用例:期望在主页上每60分钟有84个用户。
我已设置以下线程属性:

线程数:84

Ramp-up时间 - ? [我不确定要设置多少]

循环次数 - 永远

调度器 - 3600秒[60分钟]

英文:

How to I calculate Ramp-up time in JMeter

Test Case : Expecting 84 users per 60 minutes on the home page.
I have set following thread properties :

No. of Threads : 84

Ramp-up Time - ? [I am not sure what to set]

Loop count - Forever

Scheduler - 3600 Seconds[60 Minutes]

答案1

得分: 2

也许在负载测试中控制线程数的最佳方式之一是使用自定义线程组插件之一来配置渐进升级和稳定状态。在你的示例中,Ultimate Thread Group 似乎是合适的选择。以下是如何配置该线程组以逐渐升级到84个线程,然后在目标测试应用程序上保持该负载的示例:

Rampup calculation in jmeter

在上面的示例中,可以配置负载在一段时间内(例如5分钟)逐渐升级,然后持续任意所需的持续时间(这里为600秒或10分钟)。使用Ultimate线程组时,不需要离散的循环计数,因为在任何时候,持续稳定状态的确切线程数始终为84个——当一个线程完成时,另一个线程立即启动以取代它。

有一篇很好的文章涵盖了在这里使用JMeter自定义线程组,可以更详细地解释设置Ultimate线程组和同一自定义线程组包中可用的具有分析能力的相关线程组的详细信息。这恰好是今天最受欢迎的JMeter插件之一。

英文:

Probably the best way to control the number of threads in your load test is to use one of the Custom Thread Groups plugins to profile ramp-up and steady states. In your example the Ultimate Thread Group seems to be appropriate. Here is an example of how you can configure that thread group to gradually ramp up to 84 threads and then sustain that load against your target test application:
Rampup calculation in jmeter

In the above example your load can be configured to ramp up gradually over a period of time (i.e., 5 minutes), and then sustained for any desired duration (here for 600 seconds or 10 minutes). When using the Ultimate Thread Group, a discrete loop count is not necessary as at any point exactly 84 threads for the sustained steady-state will be active at all times — when one thread finishes, another is immediately started to take its place.

There is a good article that covers using JMeter Custom Thread Groups here that can explain more of the details to setting up the Ultimate Thread Group and related thread groups with profiling capabilities available in the same Custom Thread Groups package. This happens to be one of the most popular JMeter plugins that is used today.

答案2

得分: 0

主要思想是逐渐增加负载,这样你不会一次性剔除所有 84 个用户,而是从 1 开始,一段时间后再添加一个,依此类推。这次你将能够将增加的负载与其他指标(如响应时间、吞吐量、错误数量等)相关联。它还会提供饱和点以及问题的瓶颈。

如果你没有更好的想法,可以尝试遵循JMeter文档

增加速度(Ramp-up)需要足够长,以避免在测试开始时的工作负载过大,但也要足够短,以确保最后的线程在第一个线程完成之前开始运行(除非希望出现这种情况)。

增加速度 = 线程数量 开始,根据需要进行上下调整。

如果你想要我的个人建议,我会这样做:

  1. 在前 20 分钟内增加负载。
  2. 将 84 个用户继续运行 20 分钟。
  3. 最后的 20 分钟,我会逐渐减少负载,以查看系统的反应。

更多信息:JMeter增加速度期间:终极指南

英文:

The main idea is increasing the load gradually so you won't kick off all 84 users at once but rather start with 1, after certain time add another one, etc. This time you will be able to correlate increasing load with other metrics like response time, throughput, number of errors, etc. It will also give you the saturation point and the bottleneck in case of problems.

If you don't have better ideas you can try sticking to JMeter documentation:

>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.

If you want my personal piece of advice I would:

  1. Increase the load for first 20 minutes
  2. Leave 84 users up and running for another 20 minutes
  3. Last 20 minutes I would gradually decrease the load to see how does the system react

More information: JMeter Ramp-Up Period: The Ultimate Guide

huangapple
  • 本文由 发表于 2023年5月21日 16:22:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/76298928.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定