Thursday 20 April 2006 2:53:05 am
Hello, First of all, I am not an eZ Publish expert, but we have been suffering performance issues and we have partly solved them. But maybe there is room for improvement if we share our best practices. We have drastically improved the performance doing so but maybe we can even go further so I share what we have done and you can comment, add your config files or rectify me. <b>[Are the templates correctly cached]</b> Activate the Debug Output for the Template. If your template is correctly cached you should only see 3 templates loaded: 1/ setup/debug_toolbar.tpl setup/debug_toolbar.tpl design/standard/templates/setup/debug_toolbar.tpl 2/ setup/clear_cache.tpl setup/clear_cache.tpl design/standard/templates/setup/clear_cache.tpl 3/ setup/quick_settings.tpl setup/quick_settings.tpl design/standard/templates/setup/quick_settings.tpl All other templates listed means that they are **NOT** cached (Thanks to eZ Sytems France for the hint)
<b>[Templates]</b> Use cache-blocks. You can use cascading cache blocks. Compile the templates everytime you flush the cache. I did a Cron to make sure the templates were compiled at night.
cd /var/www/yoursite/
Php bin/php/eztc.php
<b>[Encoding]</b> Make sure you use the same encoding everywhere (eg: utf-8). There is a thread in the forum about that. <b>[The site.ini file::ContentSettings]</b>
CachedViewModes : "full; sitemap; pdf" This tells which files should be cached so if you have only « pdf » as we did !! Only PDF files will be cached.
CacheThreshold : 7200 The cache is regenrated every 2 hours StaticCache : Disabled
<b>[The site.ini file:: DatabaseSettings]</b>
UsePersistentConnection : enabled This should speed up a bit the database access.
Transactions : enabled I guess this slows down the speed but it gives more safety.
<b>[The site.ini file:: SearchSettings]</b>
DelayedIndexing :enabled (make sure you run runcronjobs.php at night to index the new articles)
<b>[The site.ini file:: TemplateSettings]</b>
NodeTreeCaching :enabled
TemplateCompile : enabled
TemplateOptimization : enabled
TemplateCache : enabled TemplateCompression : Disabled <b>[The Server]</b>
<b>Hardware requirements:</b>
1 GB of RAM Fast Hard disk (SCSI recommended) 1/ We have activated hdparm to enable UDMA. By default this is not activated on many distributions. 2/ I installed Zend Optimizer and set it with 128 MB of RAM! Zend Platform tells us that sometimes the Optimizer uses more than 80 MB or RAM! 3/ PHP.ini
- Install Zend Optimizer - Put 256 MB of RAM for PHP!! (eZ France recommended it)
4/ Logrotate On certain vhost logs (and others) I have realised that there was not log rotation with I think with a file as big as 200 MB it can be a performance drag every time a new entry is added to the file.
5/ Apache2
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 20
MaxRequestsPerChild 0 </IfModule> <b>[Please ADD recommendations if you have]</b> 6/ MySQL 4.1 Starting from MySQL 4.x there is some caching enabled.
# * Fine Tuning
#
key_buffer = 32M # 16M by default
max_allowed_packet = 16M # 16M by default
thread_stack = 128K # 128K by default
#
# * Query Cache Configuration
#
query_cache_limit = 12M
query_cache_size = 128M query_cache_type = 1 <b>[Please ADD recommendations if you have]</b> Yvan ROY
|