我在 Azure Kubernetes 服务中使用 Jmeter 运行 24 小时负载测试。我在我的 jmx 文件中使用吞吐量整形计时器。没有监听器作为 jmx 文件的一部分添加。 我的测试在 6 或 7 小时后突然停止。
Jmeter slave pod 下的 jmeter-server.log 文件发出警告 --> WARN k.a.j.t.VariableThroughputTimer: No free threads left in worker pool.
使用 Jmeter 版本 - 5.2.1 和 Kubernetes 版本 - 1.19.6
我检查过,主从的 Jmeter pod 在 AKS 中持续运行(没有重启)。 我为 Jmeter slave pod 提供了 2GB 内存,负载测试仍然突然停止。 我正在使用日志分析工作区进行日志记录。检查 ContainerLog 表未收到错误。
JMX 文件的快照。 使用以下元素 -> 线程组、吞吐量 Controller 、Http 请求采样器和吞吐量整形计时器
请提出相同的建议。
最佳答案
它看起来像你的 Schedule Feedback Function最后一个参数配置错误
警告意味着吞吐量整形计时器试图增加线程数以达到/维持所需的并发性,但它没有足够的线程来执行此操作。
因此,如果您对百分比使用浮点值,则要么增加此 Spare threads ration
使其接近 1
,要么增加绝对值以匹配数字线程数。
引用自文档:
Example function call: ${__tstFeedback(tst-name,1,100,10)} , where "tst-name" is name of Throughput Shaping Timer to integrate with, 1 and 100 are starting threads and max allowed threads, 10 is how many spare threads to keep in thread pool. If spare threads parameter is a float value <1, then it is interpreted as a ratio relative to the current estimate of threads needed. If above 1, spare threads is interpreted as an absolute count.
更多信息:Using JMeter’s Throughput Shaping Timer Plugin
但是它没有解释测试的提前终止,因此请确保 jmeter/k8s 日志中没有错误,可能的原因之一是 JMeter 进程正在被 OOMKiller 终止。
关于kubernetes - 24 小时性能测试执行突然停止在 AKS 中的 jmeter pod 中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66669405/