Coder1
Aricles and Screencasts by Mike Milano
Today is: 11 March, 2010
Check todays hot topics or new pictures
Aricles and Screencasts by Mike Milano
Today is: 11 March, 2010
Check todays hot topics or new pictures
PHP APC Performance Tests with Apache abToday I ran some quick tests with PHP APC using Apache's ab benchmarking tool. The goal was to see how much of a performance gain I could see between PHP APC disabled, then enabled. So what is op-code caching?
The Testing System
Without PHP APC: 7.86 Requests per second # ab -n 50 http://localhost/drupal5/ 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).....done Server Software: Apache/2.2.3 Server Hostname: localhost Server Port: 80 Document Path: /drupal5/ Document Length: 5144 bytes Concurrency Level: 1 Time taken for tests: 6.362471 seconds Complete requests: 50 Failed requests: 0 Write errors: 0 Total transferred: 284150 bytes HTML transferred: 257200 bytes Requests per second: 7.86 [#/sec] (mean) Time per request: 127.249 [ms] (mean) Time per request: 127.249 [ms] (mean, across all concurrent requests) Transfer rate: 43.54 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 125 126 3.5 125 143 Waiting: 125 126 3.5 125 143 Total: 125 126 3.5 125 143 Percentage of the requests served within a certain time (ms) 50% 125 66% 126 75% 126 80% 126 90% 131 95% 134 98% 143 99% 143 100% 143 (longest request) With PHP APC: 52.92 Requests per second # ab -n 50 http://localhost/drupal5/ 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).....done Server Software: Apache/2.2.3 Server Hostname: localhost Server Port: 80 Document Path: /drupal5/ Document Length: 5144 bytes Concurrency Level: 1 Time taken for tests: 0.944904 seconds Complete requests: 50 Failed requests: 0 Write errors: 0 Total transferred: 284150 bytes HTML transferred: 257200 bytes Requests per second: 52.92 [#/sec] (mean) Time per request: 18.898 [ms] (mean) Time per request: 18.898 [ms] (mean, across all concurrent requests) Transfer rate: 293.15 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 18 18 0.3 18 19 Waiting: 18 18 0.0 18 18 Total: 18 18 0.3 18 19 Percentage of the requests served within a certain time (ms) 50% 18 66% 18 75% 18 80% 18 90% 19 95% 19 98% 19 99% 19 100% 19 (longest request) In Conclusion The downside to PHP APC, and other op-code apps, is that they will cause segmentation faults, although not often. I came across this article from 2bits.com. They have posted a script which will monitor the Apache logs and restart the service when a segmentation fault happens. In my opinion, that's a small price to pay for such high performance gains. |
|||
|
Copyright © 2008, Mike Milano
|