PHP 5.2. Version 16 vs. PHP 5.4.9 Performance Comparison
Hardware environment:
Server: Dl180g6 (Intel (R) Xeon (r) CPU E5620 @2.40ghz) 16G memory
Presses: Dl180g6 (Intel (R) Xeon (r) CPU E5620 @2.40ghz) 16G memory
Software Environment:
nginx1.2.5php5.4.9/5.2.16 XCache3.0.0 Max 600PHP-FPM
network environment: Gigabit
Test scenario:
PHP set two different versions, in the same hardware and network environment, under pressure configuration situation, the same number of concurrent users to send requests to the server. Compare server resource usage and things processing power.
Test results:
Concurrent users |
CPU (Us+sy) |
Load Average |
Response Time (s) |
qps/s |
20 |
46% |
9.2 |
0.022 |
950 |
40 |
49% |
13.4 |
0.032 |
890 |
60 |
52% |
22.8 |
0.043 |
860 |
80 |
54% |
28.3 |
0.055 |
840 |
100 |
55% |
42.1 |
0.064 |
820 |
PHP 5.2.16 version
Concurrent users |
CPU (Us+sy) |
Load Average |
Response Time (s) |
qps/s |
20 |
48% |
8.7 |
0.018 |
1100 |
40 |
50% |
14.6 |
0.026 |
1050 |
60 |
54% |
21.3 |
0.036 |
1010 |
80 |
56% |
26.3 |
0.046 |
998 |
100 |
57% |
34.7 |
0.054 |
1020 |
PHP 5.4.9 version