当前位置:网站首页>jmeter distributed stress test
jmeter distributed stress test
2022-08-04 00:33:00 【Jun Xian】
1.What is distributed stress testing?
by a controller(Master )发出命令,Control multiple presses(Slaves)执行操作.
2、为什么要做分布式压测?
- 一台压力机的 Jmeter 默认最大支持 1000 左右的并发用户数(线程数),再大的话,容易造成卡顿、无响应等情况,这是受限于Jmeter 其本身的机制和硬件配置(内存、CPU等)
- 由于 Jmeter 是 Java 应用,对 CPU 和内存的消耗较大,在需要模拟大量并发用户数时,单机很容易出现 JAVA内存溢出的错误,导致测试脚本本身就有瓶颈
3、实操
1、Preconditions for control machines and presses:
- jmeter 版本要一致
- jdk 主版本要一致(1.7、1.8…)
- jmeter 脚本中,csv 文件要一致
- jmeter 的插件要一致
- 同一局域网,防火墙开放端口
2、Press operation steps(以linux系统为例)
1. 编辑jmeter.properties文件
- 修改 server_port 端口默认为1009
# RMI port to be used by the server (must start rmiregistry with same port)
server_port=1234
- 修改 server.rmi.port 端口,和 server_port 保持一致即可, The default is to keep you consistent
# To change the default port (1099) used to access the server:
server.rmi.port=1234
- 设置 server.rmi.ssl.disable,默认 false,Delegate requires authentication set to true,减少不必要的麻烦
# Set this if you don't want to use SSL for RMI
server.rmi.ssl.disable=true
2. 启动 jmeter-server 服务
./jmeter-server -Djava.rmi.server.hostname=压力机ip
3、Control machine operation steps
1. 编辑jmeter.properties文件
- 修改 remote_hosts,Multiple presses are separated by commas,如果控制机也测试则加 127.0.0.1:port ,然后修改
server_port 和 server.rmi.port (和压力机一样步骤)
remote_hosts=192.168.220.129:1234,127.0.0.1:1234
#remote_hosts=localhost:1099,localhost:2010
# RMI port to be used by the server (must start rmiregistry with same port)
server_port=1234
# To change the default port (1099) used to access the server:
server.rmi.port=1234
- 设置 server.rmi.ssl.disable
# Set this if you don't want to use SSL for RMI
server.rmi.ssl.disable=true
- 设置 mode,Used to view the distributed test process,Test results for each press.不启用,在运行过程中,The controller is unable to see the results of the press in real time
mode=Standard
2. The control machine runs distributed tests

jmeter -n -t Distributed test plan.jmx -l C:\Users\one_day_i_will\Desktop\test\Distributed test plan.jtl -e -o C:\Users\one_day_i_will\Desktop\test\report -R 127.0.0.1,192.168.220.129
`
边栏推荐
猜你喜欢
随机推荐
分析:Nomad Bridge黑客攻击的独特之处
带你造轮子,自定义一个随意拖拽可吸边的悬浮View组件
C# wpf使用ffmpeg命令行实现录屏
分布式事务框架 seata
跨域问题解决方式 代理服务器
Web3 安全风险令人生畏?应该如何应对?
轻量级网络整理及其在Yolov5上的实现
Getting started with MATLAB 3D drawing command plot3
TypeScript学习
七夕活动浪漫上线,别让网络拖慢和小姐姐的开黑时间
手撕Gateway源码,今日撕工作流程、负载均衡源码
【性能优化】MySQL性能优化之存储引擎调优
第1章:初识数据库与MySQL----MySQL安装
求解同余方程 数论 扩展欧几里得
MPLS综合实验
手撕Nacos源码,今日撕服务端源码
Read FastDFS in one article
Node.js的基本使用(三)数据库与身份认证
c语言分层理解(c语言操作符)
typescript55-泛型约束









