- 论坛徽章:
- 0
|
Ubuntu 6.06 自编译 Apache 2.2.4+Php 5.2.1+eAccelerator v0.9.5
赛扬II 1GHz 320M SDRAM 10G 5400RPM Maxtor 91021U2 HDD
apache 编译参数:
- ./configure --prefix=/opt/apache --with-mpm=worker --enable-so
复制代码
php 编译参数:
- './configure' '--prefix=/opt/php' '--with-apxs2=/opt/apache/bin/apxs' '--disable-ipv6' '--with-mysql=/opt/mysql' '--enable-zend-multibyte' '--with-zlib' '--with-gd=/opt/gd' '--with-exif=/opt/exif' '--enable-mbstring' '--with-mcrypt=/opt/mcrypt' '--with-mhash=/opt/mhash'
复制代码
httpd-mpm.conf 配置:
- <IfModule mpm_worker_module>
- StartServers 10
- MaxClients 300
- MinSpareThreads 200
- MaxSpareThreads 256
- ThreadsPerChild 50
- MaxRequestsPerChild 10000
- </IfModule>
复制代码
index.php
连续3次ab -n 10000 -c 200 测试,取最好成绩:
- This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
- Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
- Copyright 2006 The Apache Software Foundation, http://www.apache.org/
- Benchmarking localhost (be patient)
- Server Software: Apache/2.2.4
- Server Hostname: localhost
- Server Port: 80
- Document Path: /index.php
- Document Length: 47463 bytes
- Concurrency Level: 200
- Time taken for tests: 118.649259 seconds
- Complete requests: 10000
- Failed requests: 157
- (Connect: 0, Length: 157, Exceptions: 0)
- Write errors: 0
- Total transferred: 476269215 bytes
- HTML transferred: 474629215 bytes
- Requests per second: 84.28 [#/sec] (mean)
- Time per request: 2372.985 [ms] (mean)
- Time per request: 11.865 [ms] (mean, across all concurrent requests)
- Transfer rate: 3920.01 [Kbytes/sec] received
- Connection Times (ms)
- min mean[+/-sd] median max
- Connect: 0 1154 671.0 1155 2522
- Processing: 50 1216 671.6 1216 2583
- Waiting: 0 1127 656.7 1124 2482
- Total: 1889 2370 55.5 2355 2586
- Percentage of the requests served within a certain time (ms)
- 50% 2355
- 66% 2361
- 75% 2366
- 80% 2368
- 90% 2405
- 95% 2514
- 98% 2583
- 99% 2585
- 100% 2586 (longest request)
- Start on
- 2007年 03月 18日 星期日 10:37:23 CST
复制代码
[ 本帖最后由 likuku 于 2007-3-18 21:33 编辑 ] |
|