Worker vs prefork MPM
From Ye Ole Stash
Contents |
Magneto Test
System Specs
- CPU: Dual Quad Intel L5520 (16 total CPUs w/ hyperthreading)
- OS: CentOS 5.5 64bit
- RAM: 24G DDR3 1066
- DISKS: Perc 6 Raid1 2x 146G 15K SAS
- PHP
- Version : 5.2.10
- Cache : APC 3.0.19 + Magento Native
- Apache
- Server version: Apache/2.2.3
- Server loaded: APR 1.2.7, APR-Util 1.2.7
- Compiled using: APR 1.2.7, APR-Util 1.2.7
- Architecture: 64-bit
Tests
- All tests were done only after a `apachectl stop` then `apachectl start` to clear any cache. If you run the benchmarks with APC on repeatedly without doing the stop/start the numbers keep getting higher and less accurate.
- Prefork
- ab -c 1000 -n 10000 http://magento.*********.***/
# These are Magento recommended settings <IfModule prefork.c> StartServers 100 MinSpareServers 100 MaxSpareServers 150 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000 </IfModule>
- worker
- ab -c 2000 -n 10000 http://magento.*********.***/
- ab -c 2000 -n 10000 http://magento.*********.***/ (this also worked but was aborted to keep things fair on the tests between the two)
<IfModule worker.c>
ServerLimit 40
StartServers 20
MaxClients 2000
MinSpareThreads 50
MaxSpareThreads 2000
ThreadsPerChild 50
MaxRequestsPerChild 4000
</IfModule>Results
Prefork
- test1
- ab -c 1000 -n 10000 http://magento.********.***/
Document Path: /
Document Length: 17387 bytes
Concurrency Level: 1000
Time taken for tests: 14.43498 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 175950272 bytes
HTML transferred: 173889860 bytes
Requests per second: 712.07 [#/sec] (mean)
Time per request: 1404.350 [ms] (mean)
Time per request: 1.404 [ms] (mean, across all concurrent requests)
Transfer rate: 12235.27 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 86 538.0 0 9000
Processing: 115 1180 2391.0 713 14010
Waiting: 110 1178 2390.5 711 14008
Total: 115 1266 2438.6 714 14041
Percentage of the requests served within a certain time (ms)
50% 714
66% 720
75% 724
80% 728
90% 778
95% 3723
98% 13760
99% 13901
100% 14041 (longest request)- Test 2
- ab -c 50 -n 1000 http://magento.********.***/
- Requests per second: 652.87
- ab -c 50 -n 1000 http://magento.********.***/
- Test 3 APC Cache OFF
- ab -c 50 -n 1000 http://magento.********.***/
- Requests per second: 201.81
- ab -c 50 -n 1000 http://magento.********.***/
Worker
- test1
- ab -c 1000 -n 10000 http://magento.********.***/
Document Path: /
Document Length: 17387 bytes
Concurrency Level: 1000
Time taken for tests: 12.488063 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 175961856 bytes
HTML transferred: 173901444 bytes
Requests per second: 800.76 [#/sec] (mean)
Time per request: 1248.806 [ms] (mean)
Time per request: 1.249 [ms] (mean, across all concurrent requests)
Transfer rate: 13760.10 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 259 1036.1 0 9000
Processing: 129 806 677.3 624 9287
Waiting: 116 798 668.8 618 9278
Total: 130 1066 1208.4 629 10243
Percentage of the requests served within a certain time (ms)
50% 629
66% 668
75% 729
80% 875
90% 3524
95% 3641
98% 3954
99% 5447
100% 10243 (longest request)- Test 2
- ab -c 50 -n 1000 http://magento.********.***/
- Requests per second: 710.64
- ab -c 50 -n 1000 http://magento.********.***/
- Test 3 APC Cache Off
- ab -c 50 -n 1000 http://magento.********.***/
- Requests per second: 238.01 [#/sec] (mean)
- ab -c 50 -n 1000 http://magento.********.***/