eZ Community » Forums » Developer » Performance PHP 5.2 vs PHP 5.3 - huge...
expandshrink

Performance PHP 5.2 vs PHP 5.3 - huge gain

Performance PHP 5.2 vs PHP 5.3 - huge gain

Wednesday 01 July 2009 7:51:38 pm - 11 replies

I was testing 5.3 on my windows box. Surprisingly I noticed an way higher performance again as expected. I was expecting round about 20 to 30 % gain, but it turned out that I had gained round about 90% in performance.

As I said on windows. Is one free todo the same tests on a linux box just for fun? If so share the results.

Here are my results on WINDOWS VISTA / MYSQL / APACHE / FASTCGI + WEBIN.

PHP 5.2

C:\workspace>c:\apache2\bin\ab.exe -n200 -c15 http://41.example.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 41.example.com (be patient)
Completed 100 requests
Completed 200 requests
Finished 200 requests


Server Software:        Apache/2.2.11
Server Hostname:        41.example.com
Server Port:            80

Document Path:          /
Document Length:        22137 bytes

Concurrency Level:      15
Time taken for tests:   32.787 seconds
Complete requests:      200
Failed requests:        0
Write errors:           0
Total transferred:      4532200 bytes
HTML transferred:       4427400 bytes
Requests per second:    6.10 [#/sec] (mean)
Time per request:       2459.025 [ms] (mean)
Time per request:       163.935 [ms] (mean, across all concurrent requests)
Transfer rate:          134.99 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.3      0       1
Processing:   995 2413 976.1   2206    6490
Waiting:      994 2413 976.1   2206    6490
Total:        995 2414 976.1   2206    6490

Percentage of the requests served within a certain time (ms)
  50%   2206
  66%   2541
  75%   2833
  80%   3031
  90%   3534
  95%   4143
  98%   6315
  99%   6334
 100%   6490 (longest request)

PHP 5.3


C:\workspace>c:\apache2\bin\ab.exe -n200 -c15 http://41.example.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 41.example.com (be patient)
Completed 100 requests
Completed 200 requests
Finished 200 requests


Server Software:        Apache/2.2.11
Server Hostname:        41.example.com
Server Port:            80

Document Path:          /
Document Length:        22137 bytes

Concurrency Level:      15
Time taken for tests:   17.846 seconds
Complete requests:      200
Failed requests:        0
Write errors:           0
Total transferred:      4521200 bytes
HTML transferred:       4427400 bytes
Requests per second:    11.21 [#/sec] (mean)
Time per request:       1338.450 [ms] (mean)
Time per request:       89.230 [ms] (mean, across all concurrent requests)
Transfer rate:          247.41 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.2      0      17
Processing:   276 1316 966.7   1168    8689
Waiting:      276 1316 966.7   1168    8688
Total:        276 1317 966.7   1168    8689

Percentage of the requests served within a certain time (ms)
  50%   1168
  66%   1285
  75%   1356
  80%   1445
  90%   1652
  95%   3134
  98%   4894
  99%   6558
 100%   8689 (longest request)
 

Modified on Wednesday 01 July 2009 7:58:04 pm by Björn Dieding@xrow.de

Wednesday 01 July 2009 8:11:09 pm

One more with php53 and define ( 'EZP_INI_FILEMTIME_CHECK', false );

EZP_INI_FILEMTIME_CHECK gives 30 % on top

 

C:\workspace>c:\apache2\bin\ab.exe -n200 -c15 http://41.example.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 41.example.com (be patient)
Completed 100 requests
Completed 200 requests
Finished 200 requests


Server Software:        Apache/2.2.11
Server Hostname:        41.example.com
Server Port:            80

Document Path:          /
Document Length:        22137 bytes

Concurrency Level:      15
Time taken for tests:   14.038 seconds
Complete requests:      200
Failed requests:        0
Write errors:           0
Total transferred:      4521200 bytes
HTML transferred:       4427400 bytes
Requests per second:    14.25 [#/sec] (mean)
Time per request:       1052.850 [ms] (mean)
Time per request:       70.190 [ms] (mean, across all concurrent requests)
Transfer rate:          314.52 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       1
Processing:   396 1031 317.0    979    1993
Waiting:      396 1031 317.1    979    1993
Total:        397 1031 317.0    979    1993

Percentage of the requests served within a certain time (ms)
  50%    979
  66%   1148
  75%   1240
  80%   1305
  90%   1488
  95%   1653
  98%   1780
  99%   1936
 100%   1993 (longest request)
 

Wednesday 01 July 2009 9:06:22 pm

Björn,

that is good news. It is not unexpected. The problem on windows has been the file i/o. In PHP 5.3 the Microsoft team have totally rewritten this and they were arguing that we should see the same performance on Windows as on Linux with PHP 5.3. This seems to be the case (or close to), I have not yet benchmarked this myself though.

-bård

Wednesday 01 July 2009 11:20:37 pm

I can confirm this, tested this a while back with alpha builds.
So a big present for us Windows developers, and also makes it more feasible to run eZ Publish on Windows servers.

"and they were arguing that we should see the same performance on Windows as on Linux with PHP 5.3"

This is an overstatement, at least for eZ Publish. I have about the same numbers as Björn, and my Linux x64 distro on the same machine gives me close to 40 Requests per second with php 5.2. From what I understood from Derick, some of the difference also comes from the slower process creation speed on Windows and slow POSIX emulation layer, not sure if they have worked on those parts as well though.

But, using IIS fastcgi and x64 builds of PHP will probably get you close to a third of the performance you get on Linux, so a lot better then 1/10 in earlier versionshappy.gif Emoticon

Monday 06 July 2009 12:12:09 pm

Hi all,

One of my client wants eZ 4.1.3 with php 5.3. I think we should wait to upgrade to php 5.3.
Are there known bugs ?
What is the official answer of eZ Systems on that point ?

Monday 06 July 2009 1:47:31 pm

There is no official response yet as we haven't been able to test it properly yet (something QA will do as part of the 4.2 release cycle sometime in august).

A quick look in the php issue tracker might suggest that you should wait for 5.3.1, as there are a couple of reports that seem to affect eZ Publish badly if they are true. (parent::func() and misc file system stuff on Windows).

Ref:
http://bugs.php.net/search.php?cm...phpver=5.3&limit=100&assign=

Modified on Monday 06 July 2009 1:50:40 pm by André R

Monday 06 July 2009 2:06:47 pm

Understood. Thank you.

Monday 06 July 2009 7:55:59 pm

Results from quick test on Linux box you can find here:
http://serwatka.net/blog/ez_publish_performance_with_php_5_3_0

Monday 06 July 2009 11:46:17 pm

@nicolas you should also keep an eye on this issue in the eZ gtracker: http://issues.ez.no/IssueView.php?Id=13825

and of course wait for a stable release of eaccelerator/xcache/apc...

Modified on Monday 06 July 2009 11:47:03 pm by Gaetano Giunta

Thursday 17 September 2009 1:23:43 pm

Hello,

we are running ez Publish 4.0.0 within a XAMPP 1.6.3a environment (with PHP 5.2.3).

I'd like to test the performance of ez Publish 4.0.0 with PHP 5.3 because we have some performance problems.

Does anyone know if there are any side-effects switching to PHP 5.3 and XAMPP 1.7.2?

Regards,
Mark

Thursday 17 September 2009 4:20:16 pm

Side effects: plenty, especially since 4.0 does not support PHP 5.3. But it's mostly warnings <del>and errors</del> though, so feel free to try.

Modified on Thursday 17 September 2009 10:03:36 pm by André R

Thursday 17 September 2009 6:59:49 pm

I think Andre meant "mostly warnings and not errors"...

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from