压力测试工具httperf使用方法
压力测试工具httperf使用方法
ftp://ftp.hpl.hp.com/pub/httperf/
下载后放到linux的/usr/local/src目录下
通过tar zxvf解压httperf-0.9.0.tar.gz
cd usr/local/src
tar zxvf httperf-0.9.0.tar.gz
进入目录
cd httperf-0.9.0
安装c++编译环境
yum install -y ncurses-devel libaio-devel cmake gcc gcc-c++ glibc
开始编译
./configure --prefix=/usr/local/httperf
make && make install
进入编译后的bin目录
cd /usr/local/httperf/bin
开始测试
./httperf --client=0/1 --server ip或域名 --port 8080 --uri /user --num-conns 30000 --rate 30000 --hog
--client=I/N 指定当前客户端I,是N个客户端中的第几个。用于多个客户端发请求,希望确保每个客户端发的请求不是完全一致。一般不用指定
• --server 所测试的的网站名(主机名,域名或者ip地址)
• --uri 指定的下载文件
• --rate 每秒发送的请求
• --num-conn 连接的总数
• --num-call 每个连接发送的请求数目
• --timeout 超时时间
实例:
[root@192 bin]# ./httperf --client=0/1 --server guixiang.top --port 8080 --uri /user --num-conns 30000 --rate 30000 --hog
httperf --hog --client=0/1 --server=guixiang.top --port=8080 --uri=/user --rate=30000 --send-buffer=4096 --recv-buffer=16384 --num-conns=30000 --num-calls=1
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
httperf: connection failed with unexpected error 113
^[[A^CMaximum connect burst length: 6347
Total: connections 1021 requests 0 replies 0 test-duration 93.509 s
Connection rate: 10.9 conn/s (91.6 ms/conn, <=1022 concurrent connections)
Connection time [ms]: min 0.0 avg 0.0 max 0.0 median 0.0 stddev 0.0
Connection time [ms]: connect 41076.2
Connection length [replies/conn]: 0.000
Request rate: 0.0 req/s (0.0 ms/req)
Request size [B]: 0.0
Reply rate [replies/s]: min 0.0 avg 0.0 max 0.0 stddev 0.0 (18 samples)
Reply time [ms]: response 0.0 transfer 0.0
Reply size [B]: header 0.0 content 0.0 footer 0.0 (total 0.0)
Reply status: 1xx=0 2xx=0 3xx=0 4xx=0 5xx=0
CPU time [s]: user 7.38 system 86.08 (user 7.9% system 92.1% total 99.9%)
Net I/O: 0.0 KB/s (0.0*10^6 bps)
Errors: total 29999 client-timo 0 socket-timo 0 connrefused 970 connreset 0
Errors: fd-unavail 28979 addrunavail 0 ftab-full 0 other 50
注意113是因为防火墙原因
关了之后:
[root@192 bin]# ./httperf --client=0/1 --server 192.168.117.170 --port 8080 --uri /user --num-conns 30000 --rate 30000 --hog
httperf --hog --client=0/1 --server=192.168.117.170 --port=8080 --uri=/user --rate=30000 --send-buffer=4096 --recv-buffer=16384 --num-conns=30000 --num-calls=1
httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE
Maximum connect burst length: 13605
Total: connections 2552 requests 0 replies 0 test-duration 1.009 s
Connection rate: 2528.6 conn/s (0.4 ms/conn, <=1022 concurrent connections)
Connection time [ms]: min 0.0 avg 0.0 max 0.0 median 0.0 stddev 0.0
Connection time [ms]: connect 213.7
Connection length [replies/conn]: 0.000
Request rate: 0.0 req/s (0.0 ms/req)
Request size [B]: 0.0
Reply rate [replies/s]: min 0.0 avg 0.0 max 0.0 stddev 0.0 (0 samples)
Reply time [ms]: response 0.0 transfer 0.0
Reply size [B]: header 0.0 content 0.0 footer 0.0 (total 0.0)
Reply status: 1xx=0 2xx=0 3xx=0 4xx=0 5xx=0
CPU time [s]: user 0.01 system 0.99 (user 1.4% system 98.3% total 99.7%)
Net I/O: 0.0 KB/s (0.0*10^6 bps)
Errors: total 30000 client-timo 0 socket-timo 0 connrefused 2552 connreset 0
Errors: fd-unavail 27448 addrunavail 0 ftab-full 0 other 0
压力测试工具httperf使用方法的更多相关文章
- linux web站点常用压力测试工具httperf
一.工具下载&&安装 软件获取 ftp://ftp.hpl.hp.com/pub/httperf/ 这里使用的是如下的版本 ftp://ftp.hpl.hp.com/pub/httpe ...
- php压力测试工具简单实用方法
命令 ab -h 指令帮助 ab -n100 -c10 http://www.baidu.com 发起100个请求 并发数为10 设置测试地址是百度,注意测试测试时候请求数和并发数尽量设置低一点 Re ...
- 压力测试工具ab及centos下单独安装方法 nginx和tomcat静态资源的性能测试
Apache安装包中自带的压力测试工具Apache Benchmark(简称ab)简单易用,这里采用ab作为压国测试工具. 独立安装: ab运行需要信赖apr-util包: # yum install ...
- 压力测试工具ab及centos下单独安装方法
压力测试工具Ab简介 Apache安装包中自带的压力测试工具 Apache Benchmark(简称ab) 简单易用,这里就采用 ab作为压力测试工具了. 1.独立安装 ab运行需要依赖apr-uti ...
- 支持https的压力测试工具
支持https的压力测试工具 测试了linux下的几种压力测试工具,发现有些不支持https,先简单总结如下: 一.apache的ab工具 /home/webadm/bin/ab -c 50 -n 1 ...
- Linux下四款Web服务器压力测试工具(http_load、webbench、ab、siege)介绍
一.http_load程序非常小,解压后也不到100Khttp_load以并行复用的方式运行,用以测试web服务器的吞吐量与负载.但是它不同于大多数压力测试工具,它可以以一个单一的进程运行,一般不会把 ...
- Linux压力测试工具Tsung安装、使用和图形报表生成
简介 Tsung 是一个压力测试工具,可以测试包括HTTP, WebDAV, PostgreSQL, MySQL, LDAP, and XMPP/Jabber等服务器.针对 HTTP 测试,Tsung ...
- 网站性能Web压力测试工具webbench
webbench最多可以模拟3万个并发连接去测试网站的负载能力,个人感觉要比Apache自带的ab压力测试工具好,安装使用也特别方便. 1.适用系统:Linux 2.编译安装: wget http:/ ...
- 推荐一个linux下的web压力测试工具神器webbench
推荐一个linux下的web压力测试工具神器webbench2014-04-30 09:35:29 来源: 评论:0 点击:880 用多了apache的ab工具之后你就会发现ab存在很多问题, ...
- Apache中压力测试工具ab的操作说明
1.压力测试工具ab(ApacheBench)的简单说明 1) 网站性能压力测试是性能调优过程中必不可少的一环.只有让服务器处在高压情况下才能真正体现出各种设置所暴露的问题.Apache中有个 ...
随机推荐
- 【 INFINI Workshop 上海站】7 月 27 日一起动手实验玩转 Easysearch
[ INFINI Workshop 上海站]7 月 27 日下午 和 INFINI Labs 的技术专家面对面,第一时间了解极限实验室的发布最新产品和功能特性,通过动手实战,快速掌握最前沿的搜索技术, ...
- 项目管理--PMBOK 读书笔记(5)【项目范围管理】
知识点: 1.范围管理计划与需求管理计划: 需求大于范围 2.项目管理的成果线: 3.收集需求的跟踪: 需求跟踪矩阵(RTM):溯源.商业价值.监控过程输出 4.项目范围说 ...
- MAPJOIN中无法使用UDF
今天在写SQL时,遇到了一个异常,提示semantic exception generate map join error unable to find class,udf编写的没毛病,其他SQL也有 ...
- Bean Searcher v4.3.0 重大更新!
往期阅读: 我这样写代码,比直接使用 MyBatis 效率提高了 100 倍 最近火起的 Bean Searcher 与 MyBatis Plus 倒底有啥区别? Bean Searcher v3.8 ...
- java.sql.SQLException: Connection is read-only. Queries leading to data modification are not
java.sql.SQLException: Connection is read-only. Queries leading to data modification are not 产生的原因:事 ...
- es语法 rest api 模拟query 根据中文姓名搜索demo
es语法 rest api 模拟query 根据中文姓名搜索demo order_info_es/_doc/40094182abc GET order_info_es/_settings?pretty ...
- 警告: BASE64Decoder是内部专用 API, 可能会在未来发行版中删除
警告: BASE64Decoder是内部专用 API, 可能会在未来发行版中删除 import org.apache.commons.codec.binary.Base64; public class ...
- docker 报Failed to create thread: Operation not permitted (1) 解决方法
docker启动容器时报:Failed to create thread: Operation not permitted (1) 原因:docker内的用户权限受限 解决办法1: 启动docker时 ...
- 【FAQ】HarmonyOS SDK 闭源开放能力 —Asset Store Kit
1.问题描述 使用关键资产API需要配置SystemCapability.Security.Asset,但不知道syscap.json文件应该配置在哪里,文档也没找到. 解决方案 新增关键资产等API ...
- 配置 Gerrit 迁移
https://gerrit.googlesource.com/plugins/replication/+doc/master/src/main/resources/Documentation/con ...