I have a VPS running Apache (prefork mpm) with 1gb RAM and 2 x Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz.
I setup 2 test files to run through Apache Benchmark: htmltest.html (basic HTML file which just displays some text) phptest.php (a completely blank php file)
I ran the following Apache Benchmark command for each: ab -k -n 1000 -c 70 THE-TEST-URL
The results were:
htmltest.html
Concurrency Level: 70
Time taken for tests: 5.374 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 992
Total transferred: 374658 bytes
HTML transferred: 134000 bytes
Requests per second: 186.10 [#/sec] (mean)
Time per request: 376.145 [ms] (mean)
Time per request: 5.374 [ms] (mean, across all concurrent requests)
Transfer rate: 68.09 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 5.5 0 48
Processing: 17 94 454.3 50 5173
Waiting: 17 93 454.3 50 5173
Total: 17 94 458.8 50 5221
phptest.php
Concurrency Level: 70
Time taken for tests: 125.159 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 997
Total transferred: 196815 bytes
HTML transferred: 0 bytes
Requests per second: 7.99 [#/sec] (mean)
Time per request: 8761.120 [ms] (mean)
Time per request: 125.159 [ms] (mean, across all concurrent requests)
Transfer rate: 1.54 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 4.0 0 58
Processing: 1003 1244 84.7 1235 2953
Waiting: 997 1244 84.9 1235 2953
Total: 1029 1244 85.8 1235 3012
Something has to be wrong here because the HTML file took only 5 seconds to complete the test and the blank PHP file took a whole 2 minutes to do the exact same test.
Is there a specific config file I should be looking at to fix the problem here?