当前位置:网站首页>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
`
边栏推荐
猜你喜欢
ES6高级-迭代器与生成器的用法
Graph-node:创建一个新的subgraph
七夕活动浪漫上线,别让网络拖慢和小姐姐的开黑时间
C# wpf使用ffmpeg命令行实现录屏
搭建好pytorch环境后,pip和conda指令不能用
BGP实验(含MPLS)
孙宇晨受邀参加36氪元宇宙峰会并发表主题演讲
手撕Nacos源码,今日撕服务端源码
Apple told Qualcomm: I bought a new campus for $445 million and may plan to speed up self-development of baseband chips
LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之三:两次优化
随机推荐
手撕Nacos源码,今日撕服务端源码
TypeScript学习
typescript53 - generic constraints
小身材有大作用——光模块基础知识(一)
关于mnn模型输出的数据杂乱无章问题
面试必问的HashCode技术内幕
【杂项】通过Excel为字符串产生条码
七夕活动浪漫上线,别让网络拖慢和小姐姐的开黑时间
FPGA按键消抖+蜂鸣器
typescript54-泛型约束
win10+cuda11.7+pytorch1.12.0 installation
新一代服务网关Gateway的实践笔记
Node.js的基本使用(三)数据库与身份认证
R3LIVE论文学习(二):VIO子系统
七夕佳节即将来到,VR全景云游为你神助攻
Modulo operation (MOD)
114. 如何通过单步调试的方式找到引起 Fiori Launchpad 路由错误的原因
易动纷享--测试实习生视频面试
DataBinding下的RecycleView适配器Adapter基类
身为程序员的我们如何卷死别人?破局重生。