Java/OJDBC performance issue with JBoss 7.1.1
donshady Jun 19, 2013 2:17 PMSuggestions Please
Guys, i am actively working on migrating an application running on JBoss 5 to JBoss 7.
After migration, I have noticed that the database calls took a huge performance hit.
I was using ojdbc14 with a pool(min - 5 max - 100) on JBoss 5 and it was working pretty good for me.
With JBoss 7, I have installed the driver as a module.
All my queries are now taking 10 times longer.
For ex, if a query took 30ms while I was on JBoss 5 , it is taking 400-600ms on JBoss 7.
I have tried with both the drivers shown in the config below (ojdbc6, ojdbc14)
An Observation is that , the perfomance decrease is more noticable on a linux box(i.e. terribly slower) than a OS X box.
FYI. I have tried running JBoss 7.1.1Final on both Java 1.6 and 1.7
My application itself contains:
- struts 2 front end (used for request processing, no web ui involved)
- Session Beans in the backend
- QuartzPlugin for batch jobs.
- a custom MBean
I have tried
1. lowering and increasing the pool size
2. prefill = true and false
3. switching between ojdbc6 and ojdbc14
{code:xml}
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jta="true" jndi-name="java:jboss/datasources/MyDS" pool-name="hive-datasource" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:oracle:thin:@host:port:service</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<connection-property name="defaultRowPrefetch">
50
</connection-property>
<driver>oracle14</driver>
<pool>
<min-pool-size>20</min-pool-size>
<max-pool-size>100</max-pool-size>
<prefill>true</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>theusername</user-name>
<password>thepassword</password>
</security>
<validation>
<check-valid-connection-sql>select * from dual</check-valid-connection-sql>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
<use-fast-fail>false</use-fast-fail>
<exception-sorter class-name="org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter"/>
</validation>
<timeout>
<set-tx-query-timeout>true</set-tx-query-timeout>
<blocking-timeout-millis>300000</blocking-timeout-millis>
<idle-timeout-minutes>30</idle-timeout-minutes>
</timeout>
<statement>
<track-statements>false</track-statements>
<prepared-statement-cache-size>0</prepared-statement-cache-size>
</statement>
</datasource>
<drivers>
<driver name="oracle6" module="com.oracle.ojdbc6">
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</driver>
<driver name="oracle14" module="com.oracle.ojdbc14">
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
</driver>
</drivers>
</datasources>
</subsystem>
{code}