Share » Forums » General » Server optimizations for apache and...

Server optimizations for apache and mysql with ez framework

Server optimizations for apache and mysql with ez framework

Monday 19 May 2008 11:13:29 pm - 4 replies

Author Message

André R.

Tuesday 20 May 2008 3:33:26 am

There are several articles and forum threads covering performance:

http://ez.no/developer/forum/general/ez_publish_performance_optimisation_faq

http://ez.no/developer/articles/ez_publish_performance_optimization_part_1_of_3_introduction_and_benchmarking
http://ez.no/developer/articles/ez_publish_performance_best_practices
http://ez.no/developer/articles/tuning_mysql_for_ez_publish

If you aren't running eZ Publish 4 yet, you should consider it:
http://ez.no/developer/forum/developer/ez_publish_4_performance_varnish

If you have already done anything there is to do (tweaking apache/php/apc/mysql/ez publish), then you should probably look into your cache strategy and start using a reverse proxy (Squid or varnish):

http://ez.no/developer/articles/using_the_squid_reverse_proxy_to_improve_ez_publish_performance

http://ez.no/developer/forum/developer/ez_publish_4_performance_varnish
http://ez.no/developer/open_funding/suggestions_for_new_functionality/http_acceleration_with_varnish

One other thing to consider is buying a faster cpu, AMD Opteron 185 is on the way out of the market and they are quite cheap. That will take you from 2.2 Ghz to 2.6 Ghz.

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

Ole Morten Halvorsen

Tuesday 20 May 2008 4:01:17 am

Hi Ali,

1. How much traffic does your server receive?
2. Are you using APC or any other sort of PHP accelerator?
3. Try increasing innodb_buffer_pool_size to 2G if you have enough memory.
4. If you can you should move MySQL to a dedicated box and set innodb_buffer_pool_size to 70/80% of available memory.

Ole M.

Senior Software Engineer - Vision with Technology

http://www.visionwt.com
http://www.omh.cc
http://www.twitter.com/omh

eZ Certified Developer
http://ez.no/certification/verify/358441
http://ez.no/certification/verify/272578

Ali Nebi

Tuesday 20 May 2008 5:51:27 am

Hi, thanks for the answer. i already started to read these articles.

The traffic that we receive per day is around 1 GB.
Yes we are also using apc accellerator.

Iguana Information Technologies, SL - http://www.iguanait.com

Gaetano Giunta

Tuesday 20 May 2008 1:49:01 pm

The Apache settings for min/max/spare servers are quite useless if you do not know how many concurrent http connections you have.
To size those appropriately, a simple process is this: enable mod_status, turn it on to full info, then get one of the tools that periodically poll the server-status page and display nice graphs out of the data.
Enabling mod-status will increase Apache mem usage, but after you have profiled you can turn it off.

There are some other tools that can graph also the number of connections to your db, which is a very important information for tuning, too. Cacti, collectd and rrd are your friends.

Having said that, some very general tips (seeing the stats you reported, you probably already know about these, but anyway) - mostly unrelated to cpu usage, unfortunately:

- disable .htaccess files in apache conf
- give enough shmem to your opcoded cache
- MaxRequestsPerChild is a kind of protection against memleaks/segfaults in apache+php. If you have lotsa traffic, 4000 can be low. Check out average age of your Apache process, if it is less than an hour you can raise it
- recompile apache + php as a full static app, no modules. Make sure you have the complete list of apache and php modules needed. Eliminate any you do not need.
- same goes for mysql: recompile statically, include only utf8 charset
- use unix domain socket for connecting to mysql
- You can test if using the intel ICC (not free!) gives faster code
- disable atime registration on the fs partition holding your website
- disable all unnecessary services on the server
- move awstats to another server and ship apache logs to it for processing: when it is parsing the log files is a complete cpu hog!
- configure apache to avoid unnecessary requests from browsers, eg. set Expires headers on css/js/images
- as a last resort, enable eZ static cache
- move db to a different server

Principal Consultant International Business
Member of the Community Project Board

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

36 542 Users on board!

Forums menu