当前位置:网站首页>jmeter分布式压测
jmeter分布式压测
2022-08-04 00:28:00 【俊先】
1.什么是分布式压测?
由一台控制机(Master )发出命令,控制多个压力机(Slaves)执行操作。
2、为什么要做分布式压测?
- 一台压力机的 Jmeter 默认最大支持 1000 左右的并发用户数(线程数),再大的话,容易造成卡顿、无响应等情况,这是受限于Jmeter 其本身的机制和硬件配置(内存、CPU等)
- 由于 Jmeter 是 Java 应用,对 CPU 和内存的消耗较大,在需要模拟大量并发用户数时,单机很容易出现 JAVA内存溢出的错误,导致测试脚本本身就有瓶颈
3、实操
1、控制机和压力机的前提条件:
- jmeter 版本要一致
- jdk 主版本要一致(1.7、1.8…)
- jmeter 脚本中,csv 文件要一致
- jmeter 的插件要一致
- 同一局域网,防火墙开放端口
2、压力机操作步骤(以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 保持一致即可, 默认是会帮你保持一致的
# To change the default port (1099) used to access the server:
server.rmi.port=1234
- 设置 server.rmi.ssl.disable,默认 false,代表需要认证设置为 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、控制机操作步骤
1. 编辑jmeter.properties文件
- 修改 remote_hosts,多个压力机以逗号分隔,如果控制机也测试则加 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,用于查看分布式测试过程中,每个压力机的测试结果。不启用,在运行过程中,控制器是无法实时看到压力机的结果
mode=Standard
2. 控制机运行分布式测试
jmeter -n -t 分布式测试计划.jmx -l C:\Users\one_day_i_will\Desktop\test\分布式测试计划.jtl -e -o C:\Users\one_day_i_will\Desktop\test\report -R 127.0.0.1,192.168.220.129
`
边栏推荐
- 如何通过单步调试的方式找到引起 Fiori Launchpad 路由错误的原因试读版
- Read FastDFS in one article
- C语言实验十五 文件
- Nanoprobes Mono- Sulfo -NHS-Nanogold的使用和应用
- sqlnet.ora文件与连接认证方式的小测试
- 轻量级网络整理及其在Yolov5上的实现
- Install third-party packages via whl
- 七夕活动浪漫上线,别让网络拖慢和小姐姐的开黑时间
- LeetCode 19:删除链表的倒数第 N 个结点
- Using matlab to solve the linear optimization problem based on matlab dynamic model of learning notes _11 】 【
猜你喜欢
随机推荐
LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之三:两次优化
Apple told Qualcomm: I bought a new campus for $445 million and may plan to speed up self-development of baseband chips
Jmeter-断言
Salesforce's China business may see new changes, rumors may be closing
2022年8月份DAMA-CDGA/CDGP数据治理认证招生简章
[Miscellaneous] How to install the specified font into the computer and then use the font in the Office software?
XSS - Bypass for loop filtering
建木DevOps流程的快速运用
机器学习——库
Prometheus监控Harbor(二进制版)
js函数防抖和函数节流及其使用场景
The world's first mass production, with the most fixed points!How does this AVP Tier1 lead?
利用matlab求解线性优化问题【基于matlab的动力学模型学习笔记_11】
【详细教程】一文参透MongoDB聚合查询
C语言 函数递归
pcl点云数据 转化为 Eigen::Map
HNUCM 2022年暑假ACM搜索专项练习
【每日一题】899. 有序队列
"Miscellaneous" barcode by Excel as a string
Eight things to pay attention to in spot silver