[opencms-dev] SOLVED Re: Performance Tuning Questions

Christian Steinert christian_steinert at web.de
Sat Jul 25 12:05:26 CEST 2009


Dear Brett

happy to hear that you managed to get your installation to perform well 
with such a rather high amount of concurrency.

>> 1 - how is performance with testOnBorrow and "SELECT 1" as test query,
>> but without eviction?
>>     
> Better, but still not fast enough
>   
Well - I expected as much, but it never hurts to try :)
> In the end, the solution was adding the following to lines to my.ini 
> (or my.cnf)
> wait_timeout=86400
> interactive_timeout=86400
>
> I had set wait_timeout=500 (seconds) as described on this tuning example:
> http://www.opencms-wiki.org/Performance_Tuning_Example
>
> It seems that after 500 seconds of inactivity, MySQL would drop the
> connection, unknown to OpenCMS. I have since set the timeout to 24
> hours and no more SQL errors
>   
Just out of interest: do you still use eviction or did you turn that off 
completely?

Probably it should be enough, if eviction runs often enough so that dead 
connections are sorted out quickly enough, e.g. by doing an eviction run 
for 10% of the max. amount of connections 10 times as often as the DB 
connections time out in mySQL. Do you actually do something like that or 
do things actually work out for you without any eviction whatsoever?

If you still need eviction, then with your current settings, this would 
of course only start to show after 24 hours.
____________

Another question: in your writeup in the have Wiki that you do page 
invalidation based on URI.
However, smaller chunks that are included into more than one page are 
better cached in a more general fashion, for example with 
cache="element" or cache="element;locale" (these two are the ones I use 
most frequently, sometimes I also create variants based on URL parameters).

Also, do you use static export on demand? This allows to further reduce 
hits on the CMS, since a static page can then be generated upon first 
request and will then be served statically by tomcat. Any publish 
operation will just clear the page cache. If you have frequently 
requested pages that only change at publish-time, then this should be a 
nice addition which reduce load and speed things up even further.

_________
Nice wiki write-up by the way - I think this can help others a lot. 
However, you still mention the mySQL wait_timeout at 500 there. Maybe 
you can also at least mention  the issue of eviction  and testOnBorrow.

Kind Regards
Christian



More information about the opencms-dev mailing list