ab命令测试apache的压力
来源:互联网 发布:java开发必读书籍 编辑:程序博客网 时间:2024/04/20 16:51
1. 最基本的关心两个选项 -c -n
例: ./ab -c 100 -n 10000 http://127.0.0.1/index.php
-c 100 即:每次并发100个
-n 10000 即: 共发送10000个请求
2. 测试结果分析
[junjie2@login htdocs]$ /data1/apache/bin/ab -c 1000 -n 50000 "http://10.10.10.10/a.php"
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking 10.65.129.21 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Finished 50000 requests
Server Software: Apache/1.3.33
Server Hostname: 10.65.129.21
Server Port: 80
Document Path: /a.php //请求的资源
Document Length: 0 bytes // 文档返回的长度,不包括相应头
Concurrency Level: 1000 // 并发个数
Time taken for tests: 48.650 seconds //总请求时间
Complete requests: 50000 // 总请求数
Failed requests: 0 //失败的请求数
Broken pipe errors: 0
Total transferred: 9750000 bytes
HTML transferred: 0 bytes
Requests per second: 1027.75 [#/sec] (mean) // 平均每秒的请求数
Time per request: 973.00 [ms] (mean) // 平均每个请求消耗的时间
Time per request: 0.97 [ms] (mean, across all concurrent requests) // 就是上面的时间 除以并发数
Transfer rate: 200.41 [Kbytes/sec] received // 时间传输速率
Connnection Times (ms)
min mean[+/-sd] median max
Connect: 0 183 2063.3 0 45003
Processing: 28 167 770.6 85 25579
Waiting: 21 167 770.6 85 25578
Total: 28 350 2488.8 85 48639
Percentage of the requests served within a certain time (ms)
50% 85 // 就是有50%的请求都是在85ms内完成的
66% 89
75% 92
80% 96
90% 168
95% 640
98% 984
99% 3203
100% 48639 (last request)
3. 用127.0.0.1来访问可以排除网络的因素,不过在Linux上用本机的对外ip访问也是不走网卡,没有网络消耗的
- ab命令测试apache的压力
- apache的ab命令做压力测试
- apache的ab命令做压力测试
- apache ab命令 压力测试
- apache ab命令压力测试
- Apache的ab压力测试
- apache的ab压力测试
- apache的ab压力测试
- php脚本压力测试,linux,apache的ab命令详解
- apache ab压力测试
- apache ab压力测试
- apache ab压力测试
- apache ab压力测试
- apache ab压力测试
- apache ab压力测试
- apache ab 压力测试
- apache ab压力测试
- apache ab压力测试 .
- vs2005编译调试找不到msvcr80d.dll的处理方法
- How to submmit jobs using Condor_G
- prototype的一个优势也是缺点
- [转]C# Socket编程笔记
- 午饭之后,看一本什么书比较好呢?
- ab命令测试apache的压力
- 在虚拟机下运行minicom 和调试使用tftp工具以及USB转串口的使用技巧
- 第十三章实验13(3)
- cacti + nagios + ndoutility + nagvis安装及配置
- JQuery插件汇总
- 一年的等待,终于可以用Windows Live Writer写CSDN博客了
- IBM Websphere Portal主题与皮肤开发
- 南京工资1W的不多吗
- 兼容Firefox(火狐)浏览器和IE浏览器的收藏代码