当前位置:网站首页>jmeter -- 分布式压测
jmeter -- 分布式压测
2022-07-05 04:35:00 【zyanwei2018】
需要分布式压测的场景
提高jmeter并发时,服务各环节均未达到瓶颈,但是接口的QPS不再等比增加,此时可能时压测机的配置和网络带宽等达到瓶颈。
在单台压测机配置和网络带宽达到瓶颈的情况下,为了达到QPS目标,一般会采用分布式压测的方案,即使用多台压力机,并使用主从模式保持并发发起的一致性。
linux压测机配置
配置准备
master节点
+ 需要上传:jmeter工具包、压测脚本、参数化文件(作为压测机时需要,放在apache-jmeter-*/bin/目录下) + vim apache-jmeter-*/bin/jmeter.properties文件 remote_hosts=ip1,ip2,ip3 (268行,master节点作压测机时也需配置ip,不能使用127.0.0.1)
slave节点
+ 需要上传:jmeter工具包(与master相同)、参数化文件(放在apache-jmeter-*/bin/目录下) + 不需要上传:压测脚本(master机会同步给slave机器) + vim apache-jmeter-*/bin/jmeter.properties文件 server.rmi.ssl.disable=true (345行,jmeter4.0版本以上需要修改改字段)
运行准备
启动压测机作为server
+ 如果master也需要作为压测机,也需要启动服务 + 进入apache-jmeter-*/bin目录,使用`./jmeter-server`命令启动压测机,监听master节点压测指令。当master节点也作为压测机时,也需要启动服务。 + 启动时,如果出现`Cannot start. xxx local is a loopback address`报错,则将bin/jmeter-server文件30行修改为`RMI_HOST_DEF=-Djava.rmi.server.hostname=当前节点ip`。
分布式运行
# 在apache-jmeter-*通级目录运行
mkdir report1
sh apache-jmeter-*/bin/jmeter.sh -n -t *.jmx -l test1.jtl -e -o report1/ -r
参数解析:
-n:非GUI模式执行Jmeter
-t:执行测试文件所在的位置及文件名
-l:指定生成测试结果的保存文件,jtl文件格式
-e:测试结束后,生成测试报告
-o:指定测试报告的存放位置,注意:执行命令前,report文件夹下内容必须清空,否则会报错
-r:启动所有在remote_hosts配置的服务器。注意:不需要分布式测试,只是单点就不输 -r 即可
边栏推荐
- 3 minutes learn to create Google account and email detailed tutorial!
- SPI read / write flash principle + complete code
- Ffmepg usage guide
- File upload bypass summary (upload labs 21 customs clearance tutorial attached)
- How should programmers learn mathematics
- MacBook安装postgreSQL+postgis
- Official announcement! The third cloud native programming challenge is officially launched!
- 解密函数计算异步任务能力之「任务的状态及生命周期管理」
- Moco is not suitable for target detection? MsrA proposes object level comparative learning target detection pre training method SOCO! Performance SOTA! (NeurIPS 2021)...
- Burpsuite grabs app packets
猜你喜欢
[finebi] the process of making custom maps using finebi
[phantom engine UE] realize the animation production of mapping tripod deployment
The principle of attention mechanism and its application in seq2seq (bahadanau attention)
TPG x AIDU | AI leading talent recruitment plan in progress!
NetSetMan pro (IP fast switching tool) official Chinese version v5.1.0 | computer IP switching software download
Interview related high-frequency algorithm test site 3
Components in protective circuit
How can CIOs use business analysis to build business value?
【虚幻引擎UE】实现背景模糊下近景旋转操作物体的方法及踩坑记录
American 5g open ran suffered another major setback, and its attempt to counter China's 5g technology has failed
随机推荐
Rk3399 platform development series explanation (network debugging) 7.29 summary of network performance tools
Raki's notes on reading paper: code and named entity recognition in stackoverflow
American 5g open ran suffered another major setback, and its attempt to counter China's 5g technology has failed
Sequelize. JS and hasmany - belongsto vs hasmany in serialize js
OWASP top 10 vulnerability Guide (2021)
C26451: arithmetic overflow: use the operator * on a 4-byte value, and then convert the result to an 8-byte value. To avoid overflow, cast the value to wide type before calling the operator * (io.2)
Introduction to RT thread kernel (4) -- clock management
Sword finger offer 04 Search in two-dimensional array
[moteur illusoire UE] il ne faut que six étapes pour réaliser le déploiement du flux de pixels ue5 et éviter les détours! (4.26 et 4.27 principes similaires)
Function overloading
函數(易錯)
mxnet导入报各种libcudart*.so、 libcuda*.so找不到
[phantom engine UE] only six steps are needed to realize the deployment of ue5 pixel stream and avoid detours! (the principles of 4.26 and 4.27 are similar)
Data security -- 14 -- Analysis of privacy protection governance
Sequence diagram of single sign on Certification Center
How can CIOs use business analysis to build business value?
2022-2028 global and Chinese video coding and transcoding Market Research Report
概率论与数理统计考试重点复习路线
flutter 对象和列表
[crampon programming] lintcode decoding Encyclopedia - 1100 strange printer