Apache压力测试工具

apache的bin目录下的ab.exe(apache> benchmark,基准测试,压力测试),
是一款非常不错的压力测试工具了,我们经常会利用它来ab压测我们服务器的负载能力

ab -c 200 -n 300 http://haojikj.com/weixin/develop/index.php

-c 代表并发数量  -n 代表请求数量
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

##请求完成数量
Benchmarking haojikj.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests


Server Software:        Apache/2.4.18
Server Hostname:        haojikj.com
Server Port:            80

Document Path:          /weixin/develop/index.php
Document Length:        6172 bytes

Concurrency Level:      200  ##并发量
Time taken for tests:   30.859 seconds ##花费时间
Complete requests:      300  ##请求数量
Failed requests:        1  ##失败请求数量
   (Connect: 1, Receive: 0, Length: 0, Exceptions: 0)
Total transferred:      1976100 bytes   ##总共传输字节数,包含http的头信息等
HTML transferred:       1851600 bytes  ##html字节数,实际的页面传递字节数
Requests per second:    9.72 [#/sec] (mean)  ##每秒多少请求,这个是非常重要的参数数值,服务器的吞吐量
Time per request:       20572.408 [ms] (mean)  ##用户平均请求等待时间
Time per request:       102.862 [ms] (mean, across all concurrent requests)  ##服务器平均处理时间,也就是服务器吞吐量的倒数
Transfer rate:          62.54 [Kbytes/sec] received  ##每秒获取的数据长度

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        9   13   3.1     12      45
Processing:    81 10485 10765.8   2281   23573  ##响应等待时间
Waiting:       37 9616 10859.8   1036   23531   ##等待接受结果时间
Total:         92 10497 10765.6   2295   23583

Percentage of the requests served within a certain time (ms)
  50%   2295  ##50%的请求在2295毫秒内完成
  66%  23537
  75%  23562
  80%  23564
  90%  23570
  95%  23574
  98%  23580
  99%  23581
 100%  23583 (longest request)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值