Forums / Setup & design / Horrible eZ Performance on windows with APACHE 1.3/PHP4.4

Horrible eZ Performance on windows with APACHE 1.3/PHP4.4

Author Message

James Kessel

Tuesday 19 December 2006 11:46:37 pm

Hi,

The last couple of days I've been tweaking and testing eZPublish on windows 2003 with Apache 1.3 and PHP 4.4.4. But even with view caching/template caching/template compilation enabled and eAccellerator the performance is just down the drain. Each page request is draining 30% of the cpu, so clearly something must be terribly wrong, or... ?

Hence I was wondering whether or not ezPublish is able to run on windows with acceptable performance and what steps should be performed in order to make it run. Reading from the debug output, template processing is the main performance thief, taking an average of 2,5 sec on each pagerequest with template caching/view cachin/template compilation enabled.

Regards,
James

Donat Fritschy

Wednesday 20 December 2006 5:06:06 am

I have implemented http://www.cbsa.ch, based on eZ Version 3.8.4, on a Windows 2003 server. The performance is not astounding, but acceptable.

Main things to consider:

- Give the server enough memory. 2 GB is the minimum.

- Give PHP enough memory. We have set the memory_limit to 256M

- Give the accelerator enough memory. We used APC with following settings: shm_size 128M, max_file_size 2M. With this settings and the cache block below, 99% of all request are handled by the APC cache.

- Use few, but big {cache} blocks. In fact, I have just one big {cache} block in pagelyout.tpl, which spans from the very beginning to the place where {$module_result.content} is inserted (excluding). The cache block uses the page URI and the language as key:

{cache-block keys=array( $uri_string, $site.http_equiv.Content-language )
             subtree_expiry=$uri_string
             ignore_content_expiry}

Hope this helps.
Regards, Donat

http://www.webmanufaktur.ch - Developers united in eZ Publish: http://www.cjw-network.com

James Kessel

Thursday 21 December 2006 2:17:13 am

Hi Donat,

Thanks for your reply. after I manually compiled the templates using the eztc script I managed to get script time down to 0.16 sec/page. The cpu is however still way to high with its avg. 25%/page consumption. I'm trying to determine why apache/php is draining so much cpu/page, but haven't got a clue so far.

Below is the debug output from ezPublish. Any advice would be appreciated.

Regards
James

Timing points:
Checkpoint Elapsed Rel. Elapsed Memory Rel. Memory 
Module start 'content' 0.0000 sec 0.0355 sec 0.0000KB 0.0000KB 
Module end 'content' 0.0355 sec 0.0321 sec 0.0000KB 0.0000KB 
End 0.0676 sec   0.0000KB 0.0000KB 
Total runtime: 0.0963 sec  

Time accumulators:
 Accumulator  Elapsed  Percent  Count  Average 
ini_load     
Load cache 0.0285 sec 18.1939% 10 0.0029 sec 
FindInputFiles 0.0202 sec 12.8681% 10 0.0020 sec 
Mysql Total     
Mysql_queries 0.0005 sec 0.3389% 1 0.0005 sec 
Looping result 0.0001 sec 0.0390% 1 0.0001 sec 
TS translator     
TS init 0.0076 sec 4.8307% 2 0.0038 sec 
TS cache load 0.0033 sec 2.1058% 2 0.0016 sec 
TS context load 0.0019 sec 1.1846% 2 0.0009 sec 
Template Total 0.0467 sec 29.8% 2 0.0234 sec 
Template load 0.0198 sec 12.6648% 2 0.0099 sec 
Template processing 0.0264 sec 16.8203% 2 0.0132 sec 
override     
Cache load 0.0138 sec 8.7947% 2 0.0069 sec 
General     
dbfile 0.0013 sec 0.8344% 7 0.0002 sec 
Total script time: 0.1567 sec  

Tony Wood

Thursday 21 December 2006 6:21:39 am

Hi James,

Your only way forward is to run Static cache or to run APC or other accelerator. Windows is just not as fast a Linux so you will always be IMHO 20% slower. I know MS are looking to "help" the PHP folks improve performance on Windows boxes but that will take time.

Tony

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

Tony Wood

Thursday 21 December 2006 6:29:19 am

I forgot to ask.. How many users did you test this with? http_load is a good test.
On a good Windows box you should be able to get 150 concurrent users, but it really depends on what your templates are doing.

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

James Kessel

Thursday 21 December 2006 6:42:27 am

Hi Tony,

Thank you for your reply. The debug output above are results when using eaccelerator so I can't help thinking there must be something more to it than just poor windowsperformance when our server reaches 100% cpu utilization within 4 requests/second (0-1% before loadtesting).

We are talking about a windows 2003 server with a 3Ghz dualcore processor, 4GB memory and plenty of space. If the results I'm getting is all I'll ever be able to squeeze out of ezPublish and I can expect a 20% speed increase on Linux ( 5 req/sec ) I'm having trouble seeing how anyone can be using ezPublish for anything, hence I must be missing something since I know some quite big sites are using it.

If anyone who's reading this are using ezPublish on a windows platform I'd really like to hear how you did it and what hardware you're using.

Regards,
James

 

Tony Wood

Thursday 21 December 2006 7:00:18 am

Hi James,

Can you please test using Siege. http://www.joedog.org/JoeDog/Siege

Can you post the results for 5 concurrent, 10, 50, please.. This will give a good idea about the load usage. We got on one of our Windows 2003 sites 50 concurrent users. To be honest I must turn the results we got into an article... Maybe next year.

Tony

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

James Kessel

Thursday 21 December 2006 7:30:09 am

Hello,

I'm currently unable to run Siege since I'm in a pure windows environment. I'm using JMeter for loadtesting. JMeteroutput with and without eaccelerator below

without eaccelerator

5 concurrent users/ 10 requests each
Samples 50
Average response time : 1434 ms
Troughput 3,2/sec
KB/sec 21,37


with eaccelerator

5 concurrent users/ 10 requests each
Samples 50
Average response time: 467 ms
Throughput 10/sec
KB/sec 67,53

10 concurrent users/10 requests each
Samples 100
Average response time: 968 ms
Throughput 9,9/sec
KB/sec 66,90

Tony Wood

Thursday 21 December 2006 9:19:15 am

Hi James,

The thing that siege gives you is the page load times. The response is ok, but if page load goes about 10 seconds (at the most) then there is no point as your visitors would have left.

Can you get this from your current tester?

Another question; Have you turned on all the template compile options?

Tony

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