I've not yet used this myself, but have you looked at the read-ahead feature
of jbosscmp? The CMP (for very little pay) docs cover this, and I would
think that it would improve the performance of your chosen design.
Of course you may already be doing this as you didn't post your
jbosscmp-jdbc.xml
cheers
dim
----- Original Message -----
From: Luttrell, Peter
To: '[EMAIL PROTECTED]'
Sent: Saturday, October 19, 2002 10:17 AM
Subject: [JBoss-user] Entity Bean Performance Tuning Help
I have something that is taking longer then I would like and am trying to
tune jboss to reduce the time it takes.
My test scenario is as such:
JBoss3.0.3 on jdk1.4.1_01
1 2.0 CMP Enity bean with about 10 fields and 3 relationships.
I'm using commit-option A so all beans should be cached (see cache policy
below) once loaded.
The first time that I run this it obviously takes longer (filling the
cache), however subsequent times aren't as fast as i would like; see below:
I have a method, which does this:
1) begin manual transaction with jta
2) calls findBySomeCriteria() which returns some 750 ejbs
->takes 200-300ms (good)
3) then iterate through each, calling one of the methods
i do this to fill the readahead cache for all the beans in an
attempt to isolate the performance problem
->takes 80-100ms (good)
4) then iterate through each, and constructing a dataobject that I use
for display purposes
->takes 2000-2500ms (this seams way too long)
5) commit the transaction, blablabla..
The problem is step 4 seams to be taking longer then it should.
I then added some trace to the dataobject constructor method, where I
basically pass in a reference to the ejb and call most of the methods on it.
The trace dumps out the total time the constructor took. I noticed a weird
pattern. Most of the constructions took 0ms, but every 5th or so it took
15-16ms, which is where all of my time is going. Note that it is not exactly
every 5th and tends to vary a bit. Here's a sample of the output:
18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,855 INFO [STDOUT] displayBean construction took 15 ms
18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,871 INFO [STDOUT] displayBean construction took 16 ms
18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,886 INFO [STDOUT] displayBean construction took 15 ms
18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,902 INFO [STDOUT] displayBean construction took 16 ms
18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,918 INFO [STDOUT] displayBean construction took 16 ms
18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,933 INFO [STDOUT] displayBean construction took 15 ms
18:46:06,933 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,933 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,933 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,949 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,949 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,965 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,965 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,965 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,965 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,965 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,980 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,980 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,980 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,980 INFO [STDOUT] displayBean construction took 0 ms
18:46:06,996 INFO [STDOUT] displayBean construction took 16 ms
my ejb-jar.xml file:
I have not declared any security-constraints for the bean.
I have tried it with transactions on and off (Required/Supports), which
effected performance a little but did not correct the delays i'm seeing.
my jboss.xml
I have the bean tied to a custom container config. Here's the custom config,
which i basically copied directly from the standardjboss.xml file. Note the
changes to the cache capacity and age, etc. This is intended to keep the
beans in the cache.
<container-configurations>
<container-configuration>
<container-name>LongLasting Large CMP 2.x EntityBean
Cache</container-name>
<call-logging>false</call-logging>
<container-invoker>org.jboss.proxy.ejb.ProxyFactory</container-invoker>
<container-interceptors>
<interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
<interceptor metricsEnabled =
"true">org.jboss.ejb.plugins.MetricsInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.EntityCreationInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.EntityLockInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.EntityInstanceInterceptor</interceptor>
<interceptor>org.jboss.resource.connectionmanager.CachedConnectionIntercepto
r</interceptor>
<interceptor>org.jboss.ejb.plugins.EntitySynchronizationInterceptor</interce
ptor>
<interceptor>org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor</interce
ptor>
</container-interceptors>
<client-interceptors>
<home>
<interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
<interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
<interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
<interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
</home>
<bean>
<interceptor>org.jboss.proxy.ejb.EntityInterceptor</interce ptor>
<interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
<interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
<interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
</bean>
<list-entity>
<interceptor>org.jboss.proxy.ejb.ListEntityInterceptor</interceptor>
<interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
<interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
<interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
</list-entity>
</client-interceptors>
&nb
sp;<instance-pool>org.jboss.ejb.plugins.EntityInstancePool</instance-pool>
<instance-cache>org.jboss.ejb.plugins.EntityInstanceCache</instance-cache>
<persistence-manager>org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager</persis
tence-manager>
<transaction-manager>org.jboss.tm.TxManager</transaction-manager>
<locking-policy>org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock</locking
-policy>
<container-cache-conf>
<cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-p
olicy>
<cache-policy-conf>
<min-capacity>50</min-capacity>
<max-capacity>10000</max-capacity>
<overager-period>100000</over ager-period>
<max-bean-age>31536000</max-bean-age>
<resizer-period>100000</resizer-period>
<max-cache-miss-period>60</max-cache-miss-period>
<min-cache-miss-period>1</min-cache-miss-period>
<cache-load-factor>0.75</cache-load-factor>
</cache-policy-conf>
</container-cache-conf>
<container-pool-conf>
<MaximumSize>100</MaximumSize>
</container-pool-conf>
<commit-option>A</commit-option>
</container-configuration>
</container-configurations>
I have also tried replacing the one of the other cache policies
(org.jboss.ejb.plugins.NoPassivationCachePolicy) and recieved no differnet
results.
Am i doing something glaringly wrong?
Can anyone suggest what else to try to get the times down?
thanks.
.peter
This transmission contains information solely for intended recipient and may
be privileged, confidential and/or otherwise protect from disclosure. If you
are not the intended recipient, please contact the sender and delete all
copies of this transmission. This message and/or the materials contained
herein are not an offer to sell, or a solicitation of an offer to buy, any
securities or other instruments. The information has been obtained or
derived from sources believed by us to be reliable, but we do not represent
that it is accurate or complete. Any opinions or estimates contained in this
information constitute our judgment as of this date and are subject to
change without notice. Any information you share with us will be used in the
operation of our business, and we do not request and do not want any
material, nonpublic information. Absent an express prior written agreement,
we are not agreeing to treat any information confidentially and will use any
and all information and reserve the right to publish or disclose any
information you share with us.
-------------------------------------------------------
This sf.net email is sponsored by:
Access Your PC Securely with GoToMyPC. Try Free Now
https://www.gotomypc.com/s/OSND/DD
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user