centos7 apache2.4 测试
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos7 apache2.4 测试相关的知识,希望对你有一定的参考价值。
安装环境
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 测试的主要内容,如果未能解决你的问题,请参考以下文章
Centos7 apache2.4.29(httpd) 安装
CentOS7 + Apache2.4 + MySQL5.7 + PHP7
centos7 + Apache2.4 + python3.5 +mod_wsgi4.5.15 + Django1.10安装指导