I've moved this to the dev list because I think it's more appropriate.
I have now run the benchmark on 4.0. Initial results were disappointing until I realised that debug log output is on in a HEAD build and off in a Branch_3_0 build. Each time, the test was run three times:
1) Create the entities and retrieve;
2) Retrieve again;
3) Flush the cache;
4) Retrieve again.
Essentially, the performance is the same, although cache flushing using the jmx-console appears to have done nothing apart from speed up the finder in 4.0.
For some reason, finder speed with results in cache is significantly slower.
I'm going to add the GlobalTxEntityMap.java fix and try profiling again. The current O(n/2) search of the ArrayList tends to dominate the numbers below.
I've appended the container config to the end so that you can review it, as I needed to revise it for 4.0.
Here are the results:
jboss-4.0.0alpha (as of about an hour ago):
21:52:17,226 INFO [STDOUT] creating 1000 Blobs...
21:52:38,894 INFO [STDOUT] Creation complete, took 21665ms.
21:52:44,278 INFO [STDOUT] testing retrival speed...
21:52:44,280 INFO [STDOUT] Initial Retrival, beans may or maynot be in cache.
21:52:44,670 INFO [STDOUT] finder took 388ms.
21:52:50,470 INFO [STDOUT] External ValueObject creation took 5798ms for 1000 objects.
21:52:52,052 INFO [STDOUT] Internal ValueObject creation took 1579ms for 1000 objects.
21:52:52,054 INFO [STDOUT] Secondary Retrival, beans are in cache.
21:52:52,565 INFO [STDOUT] finder took 504ms.
21:52:58,086 INFO [STDOUT] External ValueObject creation took 5519ms for 1000 objects.
21:52:59,613 INFO [STDOUT] Internal ValueObject creation took 1524ms for 1000 objects.
21:53:19,111 INFO [STDOUT] testing retrival speed...
21:53:19,113 INFO [STDOUT] Initial Retrival, beans may or maynot be in cache.
21:53:19,369 INFO [STDOUT] finder took 254ms.
21:53:25,001 INFO [STDOUT] External ValueObject creation took 5629ms for 1000 objects.
21:53:26,536 INFO [STDOUT] Internal ValueObject creation took 1531ms for 1000 objects.
21:53:26,538 INFO [STDOUT] Secondary Retrival, beans are in cache.
21:53:27,014 INFO [STDOUT] finder took 475ms.
21:53:32,583 INFO [STDOUT] External ValueObject creation took 5567ms for 1000 objects.
21:53:34,122 INFO [STDOUT] Internal ValueObject creation took 1537ms for 1000 objects.
21:54:15,752 INFO [EntityContainer] flushing cache
21:54:47,076 INFO [EntityContainer] flushing cache
21:54:56,454 INFO [STDOUT] testing retrival speed...
21:54:56,456 INFO [STDOUT] Initial Retrival, beans may or maynot be in cache.
21:54:56,693 INFO [STDOUT] finder took 235ms.
21:55:02,582 INFO [STDOUT] External ValueObject creation took 5886ms for 1000 objects.
21:55:04,170 INFO [STDOUT] Internal ValueObject creation took 1585ms for 1000 objects.
21:55:04,172 INFO [STDOUT] Secondary Retrival, beans are in cache.
21:55:04,658 INFO [STDOUT] finder took 475ms.
21:55:10,265 INFO [STDOUT] External ValueObject creation took 5604ms for 1000 objects.
21:55:11,839 INFO [STDOUT] Internal ValueObject creation took 1572ms for 1000 objects.
jboss-3.0.5RC1 (before the fix to GlobalTxEntityMap.java):
22:21:18,622 INFO [STDOUT] creating 1000 Blobs...
22:21:39,016 INFO [STDOUT] Creation complete, took 20391ms.
22:21:44,309 INFO [STDOUT] testing retrival speed...
22:21:44,311 INFO [STDOUT] Initial Retrival, beans may or maynot be in cache.
22:21:44,581 INFO [STDOUT] finder took 268ms.
22:21:50,336 INFO [STDOUT] External ValueObject creation took 5753ms for 1000 objects.
22:21:51,858 INFO [STDOUT] Internal ValueObject creation took 1519ms for 1000 objects.
22:21:51,861 INFO [STDOUT] Secondary Retrival, beans are in cache.
22:21:52,457 INFO [STDOUT] finder took 589ms.
22:21:57,761 INFO [STDOUT] External ValueObject creation took 5301ms for 1000 objects.
22:21:59,272 INFO [STDOUT] Internal ValueObject creation took 1508ms for 1000 objects.
22:22:29,303 INFO [STDOUT] testing retrival speed...
22:22:29,305 INFO [STDOUT] Initial Retrival, beans may or maynot be in cache.
22:22:29,808 INFO [STDOUT] finder took 501ms.
22:22:36,482 INFO [STDOUT] External ValueObject creation took 6672ms for 1000 objects.
22:22:37,988 INFO [STDOUT] Internal ValueObject creation took 1504ms for 1000 objects.
22:22:37,990 INFO [STDOUT] Secondary Retrival, beans are in cache.
22:22:38,597 INFO [STDOUT] finder took 605ms.
22:22:43,968 INFO [STDOUT] External ValueObject creation took 5368ms for 1000 objects.
22:22:45,490 INFO [STDOUT] Internal ValueObject creation took 1520ms for 1000 objects.
22:24:56,018 INFO [EntityContainer] flushing cache
22:25:32,450 INFO [EntityContainer] flushing cache
22:25:49,847 INFO [STDOUT] testing retrival speed...
22:25:49,849 INFO [STDOUT] Initial Retrival, beans may or maynot be in cache.
22:25:50,321 INFO [STDOUT] finder took 470ms.
22:26:03,023 INFO [STDOUT] External ValueObject creation took 12700ms for 1000 objects.
22:26:04,586 INFO [STDOUT] Internal ValueObject creation took 1561ms for 1000 objects.
22:26:04,589 INFO [STDOUT] Secondary Retrival, beans are in cache.
22:26:05,169 INFO [STDOUT] finder took 579ms.
22:26:10,496 INFO [STDOUT] External ValueObject creation took 5324ms for 1000 objects.
22:26:12,015 INFO [STDOUT] Internal ValueObject creation took 1516ms for 1000 objects.
<container-configuration>
<container-name>LongLasting Large CMP 2.x EntityBean Cache</container-name>
<call-logging>false</call-logging>
<sync-on-commit-only>false</sync-on-commit-only>
<container-interceptors>
<interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</ interceptor>
<interceptor>org.jboss.ejb.plugins.LogInterceptor</interceptor>
<interceptor>org.jboss.security.AuthenticationInterceptor</ interceptor>
<interceptor>org.jboss.security.RoleBasedAuthorizationInterceptor</ interceptor>
<interceptor>org.jboss.security.RunAsSecurityInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
<interceptor metricsEnabled="true">org.jboss.ejb.plugins.MetricsInterceptor</ interceptor>
<interceptor>org.jboss.ejb.entity.EntityInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.EntityLockInterceptor</interceptor>
<interceptor>org.jboss.ejb.plugins.EntityInstanceInterceptor</ interceptor>
<interceptor>org.jboss.ejb.plugins.EntityReentranceInterceptor</ interceptor>
<interceptor>org.jboss.ejb.plugins.EntitySynchronizationInterceptor</ interceptor>
<interceptor>org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor</ interceptor>
<interceptor>org.jboss.ejb.entity.BaseEntityInterceptor</interceptor>
<interceptor>org.jboss.resource.connectionmanager.CachedConnectionInterc eptor</interceptor>
<interceptor>org.jboss.ejb.entity.CMPInterceptor</interceptor>
<interceptor>org.jboss.ejb.CallbackInterceptor</interceptor>
</container-interceptors>
<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</ persistence-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-policy>
<cache-policy-conf>
<min-capacity>50</min-capacity>
<max-capacity>10000</max-capacity>
<overager-period>100000</overager-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>
On Sunday, November 24, 2002, at 04:47 AM, Dain wrote:
Can you try 4.0?
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
