码迷,mamicode.com
首页 > Web开发 > 详细

centos7 apache2.4 测试

时间:2016-06-27 12:24:59      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:apache

安装环境

centos7

apache2.4

php5.4

均使用YUM安装。

默认配置。

创建phpinfo

echo "<?php phpinfo(); ?>" >> /home/www/html/index.php

使用ab,phpinfo进行测试

出现socket错误继续进行(-r Don‘t exit on socket receive errors.)


第一次测试

ab -r -n 20000 -c 2000 ‘http://127.0.0.1/index.php‘

测试期间,新建一个会话,统计httpd进程数。

ps -ef|grep httpd|wc -l
259

最多的时候是259个进程,基本符合默认配置最多256个httpd进程


测试结果

Document Path:          /index.php
Document Length:        47425 bytes
Concurrency Level:      2000
Time taken for tests:   25.896 seconds
Complete requests:      20000
Failed requests:        3613
   (Connect: 0, Receive: 473, Length: 2667, Exceptions: 473)
Write errors:           0
Total transferred:      920355599 bytes
HTML transferred:       916817843 bytes
Requests per second:    772.31 [#/sec] (mean)
Time per request:       2589.639 [ms] (mean)
Time per request:       1.295 [ms] (mean, across all concurrent requests)
Transfer rate:          34706.95 [Kbytes/sec] received
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0  135 508.1     12    3023
Processing:    10  575 2848.7     34   24849
Waiting:        0   49 269.6     23   20994
Total:         23  710 2982.3     45   24849
Percentage of the requests served within a certain time (ms)
  50%     45
  66%     46
  75%     47
  80%     51
  90%    250
  95%   3228
  98%  14225
  99%  14412
 100%  24849 (longest request)


本文出自 “专注打孔100年” 博客,请务必保留此出处http://titandeng.blog.51cto.com/823817/1793167

centos7 apache2.4 测试

标签:apache

原文地址:http://titandeng.blog.51cto.com/823817/1793167

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!