-
1. Re: oracle connections slows down over a period of time
kv_moj May 4, 2003 12:38 PM (in response to izhidov)Hi,
I don't know much about your specifics but before changing the drivers it's worth checking your JVM memory allocation. Jboss 3.0.4 comes with standard-jboss.xml configured with a bean cache size of 1000000. This will speed things up if you have allocated enough memory to hold the cache but will seriously slow down operations and eventually bring Jboss to a halt with OutOfMemory Errors if you have not.
To allocate memory to the JVM:
For standalone apps:
java "-Xmx256M" javaoptions classpath mainclass
For Jboss:
Set the JAVA_OPTS environment variable so it's available to Jboss statup.bat/sh:
JAVA_OPTS="-Xmx256M"
This allocates 256Meg with which I found I still needed to cut the cache size down to 100000 beans. This can be done by overriding container configurations for the type of container (ie Standard CMP 2.x EntityBean) in jboss.xml.
Add this to the top of your jboss.xml (This example is for ejb2.x Entity bean - for other container types copy the relevant fragment from standard-jboss.xml and adjust as necessary)
<container-configurations>
<container-configuration>
<container-name>Standard CMP 2.x EntityBean</container-name>
<container-cache-conf>
<cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
<cache-policy-conf>
<min-capacity>50</min-capacity>
<!-- THIS IS THE NUMBER YOU TWEAK -->
<max-capacity>1000000</max-capacity>
<!-- ************************** -->
<overager-period>300</overager-period>
<max-bean-age>600</max-bean-age>
<resizer-period>400</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-configuration>
</container-configurations>
Hope this helps,
kv. -
2. Re: oracle connections slows down over a period of time
izhidov May 4, 2003 6:50 PM (in response to izhidov)Well, the app doesn't use entity beans, it does use MDBs but the pools size is limited to 25, during the slow down memory is at ~100-110 MB and CPU is at 80%, the following is the line from my start up script JAVA_OPTS="$JAVA_OPTS -Xincgc -Xms64m -Xmx256m -Dprogram.name=$PROGNAME"
so I assume it has room to grow. Thanks for the reply though, I've come across cache size problem before and it can bite you :)