[opencms-dev] Performance Tuning Questions

Brett Sheeran brett.sheeran at gmail.com
Fri Jul 17 04:26:08 CEST 2009


Hi,

I have a couple of questions around performance tuning:
1. How to determine the number of JDBC connections in use?
2. Does enabling Flex Cache on XML files (when associated template is
also cached) significantly reduce database requests?
Details as follows.

I am using:
-OpenCMS 7.0.5
-Tomcat 6.0
-MySQL 5.1


opencms.properties adjustments:
db.pool.default.maxActive=600
db.pool.default.whenExhaustedAction=grow
db.statements.default.whenExhaustedAction=grow


mysql.ini adjustments:
max_connections=900
query_cache_size=128M
query_cache_limit=14000
query_cache_wlock_invalidate=1
max_connect_errors=100
wait_timeout=500
max_allowed_packet=32M


All pages are based on one template with FlexCache set to 10 minutes.

I am running a test consisting of 600 sessions that load 40 pages
(resulting in 600 server hits) per second.

I have run the following two lines of code while under load.
   cmsSqlManager.getActiveConnections("opencms:default");
   cmsSqlManager.getIdleConnections("opencms:default");
The results indicate that there are typically 9/10 idle connections
and 0/1 active connection.

I find these results strange for 2 reasons. Firstly, I have set
maxActive (connections) to 900. Secondly, MySQL "status" command
indicates the database is receiving 580 queries per second.

Question 1, is there some way to determine the number of JDBC
connections being used under load?

In practice, the will be hundreds of variations for each page (which
are all cached).
So question 2, if I set a secondary Flex Caching for the XML files
that provide the data to those pages, would that result in a
significant reduction in database queries.

Thank you.

Regards Brett S



More information about the opencms-dev mailing list