如何在Jmeter中配置在从属计算机上运行的线程数? [英] How to configure the number of threads to run on slave machines in Jmeter?
问题描述
如何控制每个jmeter从属计算机上运行的线程数.
例如,如果我总共有 300个线程和 2个从属计算机,我希望将负载平均分配到两台从属计算机上- 150个线程在从属机器A 上运行& 150个线程,可在从机计算机B 上运行.
How can I control the number of threads running on each jmeter slave machines.
i.e. if I have 300 threads in total and 2 slave machines, I want the load to be distributed evenly on both slave machine - 150 threads to run on slave machine A & 150 Threads to run on slave machine B.
我也尝试使用以下命令在非GUI模式下运行
I have tried running in non gui mode also with the below commands
Jmeter -n -t TESTING.jmx -R 10.27.30.93 –J 6
使其在特定的从属服务器上运行6个线程,但不起作用.
它调用测试计划中保存的相同数量的线程
to make it run on a specific slave server for 6 threads, but its not working.
It invokes the same number of threads saved in the test plan
推荐答案
-
使用 __P设置线程组的线程数" ()功能类似
${__P(threads,)}
-
按如下所示修改您的JMeter启动脚本调用:
Amend your JMeter startup script invocation as follows:
jmeter -n -t TESTING.jmx -R 10.27.30.93 –Gthreads=6
根据JMeter命令行帮助:
As per JMeter command-line help:
-G, --globalproperty <argument>=<value>
Define Global properties (sent to servers)
e.g. -Gport=123
or -Gglobal.properties
另一个选项是在 user.properties 文件(位于JMeter安装的/bin文件夹下)中为每个远程引擎配置所需的线程数.
Another option is configure desired number of threads for each remote engine in user.properties file (lives under /bin folder of JMeter installation).
有关设置和/的更多信息,请参见 Apache JMeter属性自定义指南.或覆盖JMeter属性.
See Apache JMeter Properties Customization Guide for more information on setting and/or overriding JMeter Properties.
这篇关于如何在Jmeter中配置在从属计算机上运行的线程数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!