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集成环境, ...
随机推荐
- python中的argsort函数
>>> import numpy >>> help(numpy.argsort) Help on function argsort in module numpy. ...
- B树、Trie树详解
查找(二) 散列表 散列表是普通数组概念的推广.由于对普通数组可以直接寻址,使得能在O(1)时间内访问数组中的任意位置.在散列表中,不是直接把关键字作为数组的下标,而是根据关键字计算出相应的下标. 使 ...
- Spring 依赖注入(DI)的注解
Spring中想要使用注解进行依赖注入,需要进行如下配置: <beans xmlns="http://www.springframework.org/schema/beans" ...
- 利用KEGG的API获取基因对应的pathway 信息
KEGG 官网提供了API, 可以方便的访问KEGG 数据库中的内容,链接如下: http://www.kegg.jp/kegg/rest/keggapi.html 利用API可以得到某一个基因参与的 ...
- Onject.Instantiate实例
该函数有两个函数原型: Object Instantiate(Object original,Vector3 position,Quaternion rotation); Onject Instant ...
- 同一种类型的两个对象赋值,用反射。再也不用点属性了。。。。(适用于ef)
/// <summary> /// 给对象赋值的方法(不赋地址)(同一个类型),含过滤 /// </summary> /// <typeparam name=" ...
- yii2的Console定时任务创建
Yii2的定时任务可以有两种写法,原理都是通过服务器的定时任务去调用 1.通过调用指定的URL访问 就相当于在浏览器中访问 2.通过console调用 下面我们就来说说Console 是如何实现定时任 ...
- 第八章 示例代码(MyBatis)
Sample Code JPetStore 6 is a full web application built on top of MyBatis 3, Spring 3 and Stripes. I ...
- get 方法向后台提交中文乱码问题
前端js代码 function searchAll(){ var contentStr = $('#contentStr_id').val(); contentStr =encod ...
- can not connect to MySQL server on "10.30.48.153"(13)
国庆节前好好的程序,完了回来愣是不能跑了! 真是纳闷了,而且邮件别人都发出去了,等于这跟别人一边使用一遍救火一样子了. 查了一下午,一直以为是机器mysql服务的问题,或者是我代码的问题.该找 ...