技术开发 频道

RHEL5.4下LAMP平台搭建及基本测试

  4、 AB压力测试

  先修改最大文件数限制

[root@localhost htdocs]# ulimit -a | grep "open files"
open files                      (
-n) 1024
[root@localhost htdocs]# ulimit
-n 10000
[root@localhost htdocs]# ulimit
-a | grep "open files"
open files                      (
-n) 10000
[root@localhost htdocs]#
/usr/local/apache2/bin/ab -q -c 2000     \
-n 4000 http://www.crazylinux.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright
1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.crazylinux.com (be patient).....done


Server Software:        Apache
/2.2.13
Server Hostname:        www.crazylinux.com
Server Port:            
80

Document Path:          
/
Document Length:        
19 bytes

Concurrency Level:      
2000            //用于并发连接的请求数
Time taken for tests:   8.958 seconds      //测试过程消耗的时间
Complete requests:      4000           //测试过程总共完成的请求数
Failed requests:        0                 //失败的请求数
Write errors:           0
Total transferred:      
1078152 bytes     //测试过程网络传输量
HTML transferred:       76152 bytes     //测试过程中的HTML内容传输量
Requests per second:    446.51 [#/sec] (mean)       //服务器平均每秒相应的请求数
Time per request:       4479.196 [ms] (mean)    //服务器平均每请求的相应时间
Time per request:       2.240 [ms] (mean, across all concurrent requests)
Transfer rate:          
117.53 [Kbytes/sec] received

Connection Times (ms)                        
//连接时间统计信息
              min  mean[+/-sd] median   max
Connect:        
0  535 1262.9      0    4313
Processing:    
1  583 1539.2     42    8389
Waiting:        
0  583 1539.1     42    8386
Total:        
36 1118 2052.6     42    8956

Percentage of the requests served within a certain time (ms)
  
50%     42
  
66%     76
  
75%    864
  
80%   2489
  
90%   4321
  
95%   4609
  
98%   8872
  
99%   8909
100%   8956 (longest request)
0
相关文章