JMeter配置远程执行
在对容器技术相关的各个组件进行压力测试时,我们选用JMeter作为压测工具,分别对docker daemon, convoy(a docker volume driver), contiv/netplugin (a docker net driver), swarm, etcd, OpenVSwitch, registry进行了压力测试。我们准备了几十台PM作为worker,为了便于本地修改JMeter测试用例后进行调测脚本等,需要对JMeter进行远程执行配置。本文主要记录该配置事项。
##Architecture
本文假设只配置一台Remote JMeter Instance(10.100.84.21)
##Server Config
- 编辑Server端JMeter的配置文件-jmeter.properties, 修改client.rmi.localport和server.rmi.localport如下:
-
#
Parameter that controls the RMI port used by the RemoteSampleListenerImpl (The Controler)#
Default value is 0 which means port is randomly assigned#
You may need to open Firewall port on the Controller machine client.rmi.localport=7000
#
To use a specific port for the JMeter server engine, define
#
the following property before starting the server:
server.rmi.localport=60000
- 编辑jmeter.properties, 修改Remote batching configuration中的mode为Standard:
#
---------------------------------------------------------------------------#
Remote batching configuration#
--------------------------------------------------------------------------- mode=Standard - 保存后,执行./jmeter -s 启动jmeter server。
##Client Config:
-
编辑jmeter.properties, 修改Remote hosts and RMI configuration中的remote_hosts和client.rmi.localport如下:
#
---------------------------------------------------------------------------#
Remote hosts and RMI configuration#
---------------------------------------------------------------------------#
Remote Hosts - comma delimited remote_hosts=10.100.84.21 client.rmi.localport=7000 -
编辑jmeter.properties, 修改Remote batching configuration中的mode为Standard:
#
---------------------------------------------------------------------------#
Remote batching configuration#
--------------------------------------------------------------------------- mode=Standard -
保存后,执行./jmeter 启动带GUI的jmeter。
##执行测试计划
打开测试计划后,按照如下图所示方法即可远程执行该测试计划。
PS:你也可以执行如下命令,通过命令行的方式执行远程执行测试计划,不带GUI。
jmeter -n -t script.jmx -r
转载于:https://my.oschina.net/jxcdwangtao/blog/827756