jmeter的master-slave模式

  要求:

  • 1、相同的jmeter版本
  • 2、最好相同的java版本

  jmeter可以通过master-slave的方式实现更大的并发,但是作为master的机器将会消耗更多的资源,因为所有的slave的压测数据都要通过网络传输到master机器上,然后由master机器完成这些数据的整理和输出。

  各个slave并非分布式,而是都跑相同的测试用例。Note: The same test plan is run by all the servers. JMeter does not distribute the load between servers, each runs the full test plan. So if you set 1000 Threads and have 6 JMeter server, you end up injecting 6000 Threads.

  压测时,master会把jmx脚本内容发给所有的slave,由slave执行压测任务。但是数据文件不会被master发给slave,因此过程中如果需要从csv中获取数据,需要提前放到slave机器里去,或者slave机器可以连接读取的文件服务器等。If the test uses any data files, note that these are not sent across by the client so make sure that these are available in the appropriate directory on each server

  控制slave/server的采样结果返回方式:异步方式、同步方式。默认情况下,是同步方式,一旦有采样结果,立即返回给master/client,这会影响slave/server的最大吞吐量。

  对于多个slave/server的情况,如果出现连接失败的slave/server,master/client如何处理?设置user.properties或者jmeter.properties

  • client.tries  尝试连接的次数
  • client.retries_delay  尝试连接的时间间隔
  • client.continue_on_fail=true  连接失败后是否继续执行

Apache JMeter Distributed Testing Step-by-step:

http://jmeter.apache.org/usermanual/jmeter_distributed_testing_step_by_step.html

  

./jmeter - 打印命令行选项

-X, --remoteexit
        Exit the remote servers at end of test (non-GUI)

测试结束后退出远端的服务器

原文:http://jmeter.apache.org/usermanual/remote-test.html

参考翻译:https://www.jianshu.com/p/1a4dc49b1993

原文地址:https://www.cnblogs.com/shengulong/p/8510107.html