Performance PHP 5.2 vs PHP 5.3 - huge gain

Author Message

Björn Dieding@xrow.de

Wednesday 01 July 2009 10:51:38 am

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)
 

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Björn Dieding@xrow.de

Wednesday 01 July 2009 11:11:09 am

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)
 

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Bård Farstad

Wednesday 01 July 2009 12: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

Documentation: http://ez.no/doc

André R.

Wednesday 01 July 2009 2: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 versions:)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Nicolas Lescure

Monday 06 July 2009 3:12:09 am

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 ?

André R.

Monday 06 July 2009 4:47:31 am

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?cmd=display&status=Open&search_for=&php_os=&php_os_not=0&boolean=1&author_email=&bug_age=0&by=&order_by=id&direction=ASC&phpver=5.3&limit=100&assign=

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Nicolas Lescure

Monday 06 July 2009 5:06:47 am

Understood. Thank you.

Łukasz Serwatka

Monday 06 July 2009 10:55:59 am

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

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Gaetano Giunta

Monday 06 July 2009 2: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...

Principal Consultant International Business
Member of the Community Project Board

Mark Hofleitner

Thursday 17 September 2009 4:23:43 am

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

André R.

Thursday 17 September 2009 7:20:16 am

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.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Gaetano Giunta

Thursday 17 September 2009 9:59:49 am

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

Principal Consultant International Business
Member of the Community Project Board

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.