Poor eZ Publish 4.0 performance

Author Message

Mariusz Scisel

Tuesday 11 December 2007 4:55:16 am

Hi,

I just tested performance of eZ Publish 4.0 and comparing to the eZ Publish 3.10.
It is worst performance I have ever seen (from the first 3.5 release i knew).

Typical installation of eZ Publish 4.0.0 with Website Interface 1.3-0

generating template cache after Cache clear bin\php\ezcache.php --clear-all --purge

eZ P 4.0.0 more than 300 sec and time out ...
ez P 3.10 50 to 60 sec and done

displaying Front Page from cache

eZ P 4.0.0 1.5 to 2 sec !!!!
ez P 3.10 0.2 to 0.3 sec (normal time on mine machine with all ezp releases 3.6 to 3.10)

This is server with configuration:
Windows XP
Apache 2.2.6
PHP 5.2.5 with 512 MB allocated memory
eaccelerator with 256 MB allocated memory

Intel Pentium 4 HT 3 GHz
Memory: 2 GB RAM
HDD with 20 GB free defragmented space (sata)
All server components optimized.

Where is the "Performance improvements "?
Maybe i missed something, Any ideas?

Mariusz

Ole Marius Smestad

Tuesday 11 December 2007 5:19:52 am

Hi Mariusz,

could you please try to disable eaccelerator, and try again. Also you might want to give APC a try.

Best regards
Ole Marius


--
Ole Marius Smestad
Lead Engineer eZ Publish
Member of the Community Project Board

Mark Marsiglio

Tuesday 11 December 2007 5:55:03 am

I am seeing the opposite of your experience. My timing points are at .035 seconds for load from cache. After clearing the cache it is 3.9 secs. This is quite a bit faster than the 3.9 installs we had on this exact same hardware last month.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Damien Pobel

Tuesday 11 December 2007 5:57:42 am

Hi Mariusz Scisel,

did you check permission (read and write) of different places like settings and var directories ?

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Mariusz Scisel

Tuesday 11 December 2007 7:14:41 am

I have tested APC cache and unfortunately it gives the same results (minimal differences).

After disabling eaccelerator (and APC) cache:

Refresh of Front Page:
Total script time: 3.9208 sec

After Clear template cache:
Total script time: 212.6683 sec

APC and eaccelerator cache disabled:

Timing points:
Checkpoint Elapsed Rel. Elapsed Memory Rel. Memory 
Module start 'content' 0.0000 sec 76.8620 sec 4,138.2813KB 12,439.2266KB 
Module end 'content' 76.8620 sec 93.7473 sec 16,577.5078KB 4,059.1797KB 
End 170.6093 sec   20,636.6875KB 0.0039KB 
Total runtime: 206.5841 sec  

Time accumulators:
 Accumulator  Elapsed  Percent  Count  Average 
ini_load     
Load cache 1.5159 sec 0.7302% 16 0.0947 sec 
FindInputFiles 1.2813 sec 0.6172% 16 0.0801 sec 
Mysql Total     
Mysqli_queries 0.4588 sec 0.2210% 75 0.0061 sec 
Looping result 0.0066 sec 0.0032% 63 0.0001 sec 
TS translator     
TS init 1.0215 sec 0.4920% 23 0.0444 sec 
TS load 0.0794 sec 0.0382% 1 0.0794 sec 
TS store cache 0.5251 sec 0.2529% 1 0.5251 sec 
TS cache load 0.2109 sec 0.1016% 22 0.0096 sec 
TS context load 0.2067 sec 0.0996% 22 0.0094 sec 
Template Total 203.7909 sec 98.2% 3 67.9303 sec 
Template load 159.3879 sec 76.7735% 3 53.1293 sec 
String conversion in template resource 0.0101 sec 0.0049% 64 0.0002 sec 
Template parser: create text elements 0.1184 sec 0.0570% 21 0.0056 sec 
Template parser: remove whitespace 0.0201 sec 0.0097% 21 0.0010 sec 
Template parser: construct tree 0.5908 sec 0.2846% 21 0.0281 sec 
Template load and register function 0.1625 sec 0.0783% 10 0.0162 sec 
Template processing 44.4025 sec 21.3876% 3 14.8008 sec 
override     
Cache load 11.2056 sec 5.3975% 24 0.4669 sec 
Sytem overhead     
Fetch class attribute name 0.0008 sec 0.0004% 4 0.0002 sec 
Fetch class attribute can translate value 0.0027 sec 0.0013% 1 0.0027 sec 
class_abstraction     
Instantiating content class attribute 0.0007 sec 0.0003% 4 0.0002 sec 
XML     
Image XML parsing 0.0261 sec 0.0126% 1 0.0261 sec 
General     
String conversion 0.0157 sec 0.0076% 587 0.0000 sec 
dbfile 0.6787 sec 0.3269% 26 0.0261 sec 
Total script time: 207.6079 sec  

Now I am testing again the web serwer, so I will write back soon.

Mariusz Scisel

Tuesday 11 December 2007 9:14:20 am

I made a few configuration changes in Apache.
Now I have this results:

PHP Accelerators disabled

Generate Template cache:
Total script time: 177.9864 sec
Page refresh:
Total script time: 2.8168 sec

APC enabled

Generate Template cache:
Total script time: 176.5726 sec

Page refresh:
Total script time: 2.8282 sec

Eaccelerator enabled

Generate Template cache:
Total script time: 175.7008 sec

Page refresh:
Total script time: 3.2253 sec
Total script time: 2.4541 sec
Total script time: 2.1989 sec

It's look like PHP cache doesn't work properly. Am I right ?

Mark Marsiglio

Tuesday 11 December 2007 9:32:00 am

That is uncharacteristically terrible performance! Do the error logs shed any light on the situation? (var/log/error.log) Also, have you checked the task manager to see if the machine is tied up with some locked up process? If you used the installer to install PHP, you might try to reinstall.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Mariusz Scisel

Tuesday 11 December 2007 10:55:04 am

Maybe it's a server configuration bug? Previous version worked fine (3.9).
Apache 2.2.6 works as windows service with PHP module php5_module.
PHP 5 was configured manually (not installed) the same as previous for ezp3.9 and ezp3.10.
MySQL 4.1.22 installed from installer.

Lately I installed new ezp4 copy (typical configuration with website interface 1.3). There is no file error.log and no Errors or Warnings in the eZ debug script, there is only one file storage.log with cache storage logs (and empty eZPaymentGatewayType.log). Refresh times are the same as previous.

Łukasz Serwatka

Tuesday 11 December 2007 1:46:09 pm

Hi Mariusz,

There is definitely something wrong with your environment and it is not necessarily related to the Apache and PHP. eZ Publish 4.0 can be fast even on Windows Vista [1] which is still slower then Windows XP.

I would start investigation from network related services such as Windows Firewall, Antivirus, 3rd party firewall if used, etc. Try disable such services and observe results. There is something that slows down template compilation process on your machine.

[1] Results from Windows Vista Business with eZ Publish 4.0 and Website Interface 1.3 after clearing whole cache:

Timing points:Checkpoint	Elapsed	Rel. Elapsed	Memory	Rel. Memory
Script start	0.0000 sec	0.1407 sec	415.1797KB	382.4531KB
Module start 'content'	0.1407 sec	17.8924 sec	797.6328KB	3,176.5781KB
Module end 'content'	18.0331 sec	9.0243 sec	3,974.2109KB	1,858.6953KB
End	27.0574 sec	 	5,832.9063KB	0.0010KB
Total runtime:	29.2501 sec	

Time accumulators: Accumulator	 Elapsed	 Percent	 Count	 Average
ini_load				
Load cache	0.3014 sec	1.0281%	17	0.0177 sec
FindInputFiles	0.1428 sec	0.4870%	17	0.0084 sec
Parse	0.0797 sec	0.2720%	17	0.0047 sec
Save Cache	0.0478 sec	0.1631%	17	0.0028 sec
Mysql Total				
Mysql_queries	0.5515 sec	1.8813%	152	0.0036 sec
Looping result	0.0071 sec	0.0242%	139	0.0001 sec
Template Total	28.9517 sec	98.8%	3	9.6506 sec
Template load	13.7292 sec	46.8289%	3	4.5764 sec
String conversion in template resource	0.0066 sec	0.0224%	111	0.0001 sec
Template parser: create text elements	0.0597 sec	0.2037%	28	0.0021 sec
Template parser: remove whitespace	0.0105 sec	0.0359%	28	0.0004 sec
Template parser: construct tree	0.2148 sec	0.7325%	28	0.0077 sec
Template load and register function	0.0078 sec	0.0267%	10	0.0008 sec
Template processing	15.2222 sec	51.9216%	3	5.0741 sec
override				
Cache load	1.0134 sec	3.4566%	49	0.0207 sec
Sytem overhead				
Fetch class attribute can translate value	0.0044 sec	0.0149%	11	0.0004 sec
Fetch class attribute name	0.0042 sec	0.0142%	18	0.0002 sec
XML				
Image XML parsing	0.0172 sec	0.0588%	11	0.0016 sec
class_abstraction				
Instantiating content class attribute	0.0009 sec	0.0029%	38	0.0000 sec
General				
String conversion	0.0063 sec	0.0214%	160	0.0000 sec
INI string conversion	0.0063 sec	0.0215%	47	0.0001 sec
String conversion w/ mbstring	0.0031 sec	0.0107%	28	0.0001 sec
dbfile	0.0313 sec	0.1068%	96	0.0003 sec
Total script time:	29.3177 sec

Results with generated cache:

Timing points:Checkpoint	Elapsed	Rel. Elapsed	Memory	Rel. Memory
Script start	0.0000 sec	0.0638 sec	385.8516KB	402.3984KB
Module start 'content'	0.0638 sec	0.0316 sec	788.2500KB	244.5859KB
Module end 'content'	0.0954 sec	0.0579 sec	1,032.8359KB	371.0156KB
End	0.1534 sec	 	1,403.8516KB	0.3623KB
Total runtime:	0.1779 sec	

Time accumulators: Accumulator	 Elapsed	 Percent	 Count	 Average
ini_load				
Load cache	0.1096 sec	56.6416%	13	0.0084 sec
FindInputFiles	0.0940 sec	48.5782%	13	0.0072 sec
Mysql Total				
Mysql_queries	0.0005 sec	0.2818%	1	0.0005 sec
Looping result	0.0000 sec	0.0118%	1	0.0000 sec
Template Total	0.0667 sec	34.5%	2	0.0333 sec
Template load	0.0383 sec	19.7878%	2	0.0191 sec
Template processing	0.0282 sec	14.5846%	2	0.0141 sec
override				
Cache load	0.0306 sec	15.8088%	2	0.0153 sec
General				
String conversion	0.0000 sec	0.0212%	2	0.0000 sec
dbfile	0.0023 sec	1.1659%	4	0.0006 sec
Total script time:	0.1934 sec

As you can see template compilation takes less then 30 sec, and pages with generated view cache are served very quick.

Dell Latitude D820:
CPU: Intel Core 2 Duo 2 Ghz
Memory: 2 GB
HDD: 100 GB 7200 RPM SATA

Apache 2.0.61
PHP 5.2.5
eAccelerator 0.9.5.2
MySQL 5.0.45

I bet that it will be even faster on Windows XP.

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

Piotrek Karaś

Tuesday 11 December 2007 1:55:14 pm

<i>Intel Core 2 Duo 2 Ghz.
Apache 2.0.61
PHP 5.2.5
eAccelerator 0.9.5.2</i>

I get similar results on vmware-based linux, no accelerator and just core duo. 4.0 performance improvement is in my case noticeable even without any measurement ;)

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Kim Johansen

Tuesday 11 December 2007 2:14:19 pm

Can you try the same configuration but with a different PHP version? Try to replace PHP 5.2.5 with PHP 5.1.2.

I have seen a huge performance difference between this versions.

Try out Free eZ Publish 4.0 Trial Hosting for 14 days:
http://webdealhosting.com/ez-publish-trial-hosting

High quality eZ Publish Hosting since 2001!

Mariusz Scisel

Wednesday 12 December 2007 12:57:04 am

Thank You all for help and suggestions. Now I am changing server configuration and testing different versions of PHP (5.1.5 , 5.1.6 ) and previous versions of Apache server.

Mariusz Scisel

Wednesday 12 December 2007 5:52:00 am

After server changes it seems to me it works much better.

Apache/2.0.61 (Win32) PHP/5.1.6 - NO PHP CACHE
Total script time: 42.1653 sec (after clear cache)
Total script time: 0.6722 sec (page refresh)

Apache/2.0.61 (Win32) PHP/5.1.6 eAccelerator 5.1.6.

Total script time: 42.9106 sec (after clear cache)
Total script time: 0.2874 sec (to 0.35~ sec) (page refresh)

Apache/2.0.61 (Win32) PHP/5.1.6 APC 5.1.6

Total script time: 40.2145 sec (after clear cache)
Total script time: 0.2756 sec (page refresh)

APC cache gives better timings (at an average)

Previous timings:

Apache/2.2.6 (Win32) PHP/5.2.5 eAccelerator 5.2.5. (and with no caching).
Total script time: 326.4227 sec (after clear cache)
Total script time: 1.7065 sec (page refresh)

I think there is something wrong with PHP 5.2.5 working with Apache 2.2.6 ...

André R.

Wednesday 12 December 2007 11:52:22 am

Yes, Kim has blogged about it:
http://www.lotto-kim.net/eng/blog

Disturbing, but it gives you an idea of how important it is to at least test out a couple of php versions as part of your tweaking before you go live with a new production server..

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

Mariusz Scisel

Wednesday 12 December 2007 1:35:35 pm

Maybe it's a problem with eZ Publish 4 working on a PHP 5.2.5 - not the Apache and PHP... who knows.. ;-) (btw: i have tested all php5.2.x branch with apache 2.0.61 and 2.2.6)

Michael Kress

Wednesday 26 December 2007 4:30:59 am

So what is the best php version to work with?
I'm planning to use php-5.2.4, but I haven't tried yet.
Greetings
Michael

Tony Wood

Wednesday 26 December 2007 5:42:54 am

It's a tough one Michael as some of the later eZ Components like WebDAV only work with PHP 5.2.x

I think either PHP need to fix the issue or eZ need to track it down and produce a workaround. I know they must be working on it... :)

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

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