[opencms-dev] Performance Tuning Questions

Olli Aro olli_aro at yahoo.co.uk
Tue Jul 21 12:01:55 CEST 2009


Hi Brett,

Are you already doing static export for all images and CSS files? If not I
would recommend you to do it.

Then additional write some rewrite rules in Apache, so that the static
export requests do not hit the OpenCms servlet, but are served from the file
system directly by Apache. This has given us massive performance
improvements in the past, so we do it every time.

Regards,

Olli

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Brett Sheeran
Sent: 21 July 2009 10:57
To: opencms-dev at opencms.org
Subject: Re: [opencms-dev] Performance Tuning Questions

Once again, thanks to Christian for his helpful reply.

> P.S. 600 / 900 connections really sounds awfully much to me.
> How many parallel users to you have at peak times?

I am currently simulating 1000 users. 600 connections is probably too
high. However, if I reduce the number of connections to 300 I get 10
second delays when the Flex Cache expires. Unfortunately I cannot use
static export as there will be hundreds of file variations..

> You should turn on eviction in opencms.properties. This has been added
> to opencms.properties.

Eviction was already activated with all the standard values.
*However*, this was still useful advice because I found that *if* I
increased numTestsPerEvictionRun, reduced timeBetweenEvictionRuns and
reduced minEvictableIdleTime *then*, my SQL errors stopped and the
number of active connections did not increase at the same rate.

So, my configuration currently looks like this:
db.pool.default.maxActive=300
db.pool.default.maxIdle=240
db.pool.default.whenExhaustedAction=grow
db.pool.default.testWhileIdle=true
db.pool.default.timeBetweenEvictionRuns=720000
db.pool.default.numTestsPerEvictionRun=600
db.pool.default.minEvictableIdleTime=360000
db.pool.default.testQuery=SELECT STRUCTURE_ID FROM
CMS_OFFLINE_STRUCTURE WHERE RESOURCE_PATH = '/'
(some of these values seem quite extreme though)

>> Incidentally, I am not querying the database directly.
> What do you mean by that? Do you mean that you queried opencms rather
> than the DB for how many connections are open?

Correct. I had not created any SQL code of my own and I was getting
the number of active connections from this command:
cmsSqlManager.getActiveConnections("opencms:default");

> In that case, I would
> expect that the DB gives much lower figures for the amount of live DB
> connections and that some connections to which opencms is still holding
> on have actually been closed by the DB.

Oh, I see.

Thanks again

Regards Brett

_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list