AB压力测试工具
1.安装AB工具:
yum install httpd-tools
2.测试:
ab -n -c http://localhost.com/
其中-n表示请求数,-c表示并发数
3.测试结果
[root@vijay01 ~]# ab -c -n http://192.168.2.11/ab.html
This is ApacheBench, Version 2.3 <$Revision: $>
Copyright Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 192.168.2.11 (be patient)
Completed requests
Completed requests
Completed requests
Completed requests
Completed requests
Completed requests
Completed requests
Completed requests
Completed requests
Completed requests
Finished requests Server Software: nginx/1.0.
Server Hostname: 192.168.2.11
Server Port: Document Path: /ab.html
Document Length: bytes Concurrency Level:
Time taken for tests: 0.105 seconds
Complete requests:
Failed requests:
Write errors:
Total transferred: bytes
HTML transferred: bytes
Requests per second: 9515.20 [#/sec] (mean)
Time per request: 1.051 [ms] (mean)
Time per request: 0.105 [ms] (mean, across all concurrent requests)
Transfer rate: 36332.46 [Kbytes/sec] received Connection Times (ms)
min mean[+/-sd] median max
Connect: 0.2
Processing: 0.5
Waiting: 0.4
Total: 0.5 Percentage of the requests served within a certain time (ms)
%
%
%
%
%
%
%
%
% (longest request)
--------------------------------------------------------------------------------------------------------------------
Server Software: nginx/1.0.
Server Hostname: 192.168.2.11
Server Port:
- 这段展示的是web服务器的信息,可以看到服务器采用的是nginx,域名是wan.bigertech.com,端口是80
Document Path: /ab.html
Document Length: bytes
- 这段是关于请求的文档的相关信息,所在位置“/”,文档的大小为338436 bytes(此为http响应的正文长度)
------------------------------------------------------------------------------------------------------------------
Concurrency Level:
Time taken for tests: 0.105 seconds
Complete requests:
Failed requests:
Write errors:
Total transferred: bytes
HTML transferred: bytes
Requests per second: 9515.20 [#/sec] (mean)
Time per request: 1.051 [ms] (mean)
Time per request: 0.105 [ms] (mean, across all concurrent requests)
Transfer rate: 36332.46 [Kbytes/sec] received
- 这段展示了压力测试的几个重要指标
Concurrency Level: 100 --并发请求数
Time taken for tests: 50.872 seconds --整个测试持续的时间
Complete requests: 1000 --完成的请求数
Failed requests: 0 --失败的请求数
Total transferred: 13701482 bytes --整个场景中的网络传输量
HTML transferred: 13197000 bytes --整个场景中的HTML内容传输量
Requests per second: 19.66 [#/sec] (mean) --吞吐率,大家最关心的指标之一,相当于 LR 中的每秒事务数,后面括号中的 mean 表示这是一个平均值
Time per request: 5087.180 [ms] (mean) --用户平均请求等待时间,大家最关心的指标之二,相当于 LR 中的平均事务响应时间,后面括号中的 mean 表示这是一个平均值
Time per request: 50.872 [ms] (mean, across all concurrent requests) --服务器平均请求处理时间,大家最关心的指标之三
Transfer rate: 263.02 [Kbytes/sec] received --平均每秒网络上的流量,可以帮助排除是否存在网络流量过大导致响应时间延长的问题
-----------------------------------------------------------------------------------------------------
Connection Times (ms) min mean[+/-sd] median max
Connect: 0.2
Processing: 0.5
Waiting: 0.4
Total: 0.5
- 这段表示网络上消耗的时间的分解
------------------------------------------------------------------------------------------------------
Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 1
80% 1
90% 2
95% 2
98% 2
99% 3
100% 5 (longest request)
- 这段是每个请求处理时间的分布情况,50%的处理时间在4930ms内,66%的处理时间在5008ms内...,重要的是看90%的处理时间。
AB压力测试工具的更多相关文章
- 4分钟apache自带ab压力测试工具使用: 2015.10.4
2015.10.44分钟apache自带ab压力测试工具使用:win8.1 wampserver2.5 -Apache-2.4.9-Mysql-5.6.17-php5.5.12-64b 可以参考一下部 ...
- win8.1上wamp环境中利用apache自带ab压力测试工具使用超简单讲解
2015.10.4apache自带ab压力测试工具使用:本地环境:win8.1 wampserver2.5 -Apache-2.4.9-Mysql-5.6.17-php5.5.12-64b 可以参考一 ...
- ab压力测试工具-批量压测脚本
ab(Apache benchmark)是一款常用的压力测试工具.简单易用,ab的命令行一次只能支持一次测试.如果想要批量执行不同的测试方式,并自动对指标进行分析,那么单靠手工一条一条命令运行ab,估 ...
- 如何使用apache自带的ab压力测试工具
ab是apache自带的一个很好用的压力测试工具,当安装完apache的时候,就可以在bin下面找到ab 1 我们可以模拟100个并发用户,对一个页面发送1000个请求 ./ab -n1000 -c1 ...
- 【Linux】ApacheBench(ab)压力测试工具
AB的简介 ab是apachebench命令的缩写. ab是apache自带的压力测试工具.ab非常实用,它不仅可以对apache服务器进行网站访问压力测试,也可以对或其它类型的服务器进行压力测试.比 ...
- Windows如何使用Apache的ab工具进行网站性能测试(Apache服务器自带了ab压力测试工具,可以用来测试网站性能,使用简单方便)
打开Apache服务器的安装路径,在bin目录中有一个ab.exe的可执行程序,就是我们要介绍的压力测试工具. 在Windows系统的命令行下,进入ab.exe程序所在目录,执行ab.exe程序.注意 ...
- linux ab压力测试工具及ab命令详解
原文链接:https://blog.csdn.net/qq_27517377/article/details/78794409 yum -y install httpd-tools ab -v 查看a ...
- ab压力测试工具的简单使用
ab是一种用于测试Apache超文本传输协议(HTTP)服务器的工具.apache自带ab工具,可以测试 apache.IIs.tomcat.nginx等服务器 但是ab没有Jmeter.Loadru ...
- ab压力测试工具的使用
一.下载稳定版2.2.31 http://httpd.apache.org/ 二.2.2.*和2.4.*区别? httpd-2.2.x(prefork) httpd-2.4.x(event) 编 ...
- apache ab 压力测试工具
Apache的ab命令模拟多线程并发请求,测试服务器负载压力,也可以测试nginx.lighthttp.IIS等其它Web服务器的压力.Apache附带的ab工具(使用的PHP环境是WAMP集成环境, ...
随机推荐
- 06 Locking and Latching
本章提要---------------------------------------------------------------6,7,8,9,10,11 这 6 章要细看, 从本章开始how ...
- u方法传参
<a href="{:U('Del/mldel',array('id'=>$vo['id']))}">删除</a>
- 在Mac下结合Xcode搭建Cocos2d-X开发环境!
第一步:下载cocos2d-X的引擎包,上面已经给出地址了: http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Download 第二步:启动终端:(点 ...
- pip -i 和 -U 参数
例子: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -U funcat -i: 指定库的安装源 -U:升级 原来已经安装的包,不带U ...
- javascript -- 判断是否为某个数据类型
为何不用其他方法,因为下面的写法考虑了各种兼容性.判断是否为数组isArray = function (source) { return '[object Array]' == Object.p ...
- linux -- Ubuntu 命令技巧合集
http://www.nenew.net/UbuntuSkills.html#.E6.9F.A5.E7.9C.8B.E8.BD.AF.E4.BB.B6xxx.E5.AE.89.E8.A3.85.E5. ...
- jquery中判断选择器,找没找到元素用$().size()==0
jquery中判断选择器,找没找到元素用$().size()==0
- C# 使用SkinSharp皮肤库
SkinSharp是Windows环境下一款强大的通用换肤库. SkinSharp作为通用换肤库,只需要在您的程序中添加一行代码,就能让您的界面焕然一新,并拥有多种主题风格和色调的动态切换功能以及Ae ...
- spark 安装配置
最佳参考链接 https://opensourceteam.gitbooks.io/bigdata/content/spark/install/spark-160-bin-hadoop26an_zhu ...
- 【ML】概率图模型
http://wenku.baidu.com/link?url=-Fa32JAnvwS8fyWgdPjYLNGvmor42lWCT6N7TehNQAnx4ZVmJtC0L0SgnaLtEFMB9Gzw ...