1
votes

Guys i am actively working on migrating an application running on JBoss AS 5 to JBoss AS 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 us.

With JBoss AS 7, I have installed the driver as a module.

All my queries are nto taking 10 times longer. For ex, if a query took 30ms while I was on JBoss AS 5 , it is taking 400-600ms on JBoss AS 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 machine than a OS X box.

FYI. I have tried running JBoss AS 7 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

standalone.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>
2
Could you please try with EAP 6.1? - Ondra Žižka
Btw the queries are native SQL? No Hibernate? - Ondra Žižka

2 Answers

1
votes

We see issues with upgrades changing database performance quite often. The key is to pin down how database queries have changed between JBoss 5 and JBoss7. The fact that you are seeing a more substantial degradation on one OS and lesser on another is not surprising since every OS has its strengths and weakness when it comes to processing efficiency.

My suggestion would be to ascertain high visibility on the database, including the queries that are causing the biggest bottlenecks with JBoss 7 and the top Wait Events. In case you are not familiar, Oracle breaks query execution down into discrete steps called Wait Events. These can be anything from waiting on a table lock to Disk I/O time taking events. There are close to 1000 Wait Events in Oracle, so getting this information manually and correlating the wait event with the query and hardware resources can be very difficult.

Here is a link to a free version of the Ignite database monitoring software that should help you out http://www.ignitefree.com

0
votes

For example, an operation that took 2ms on JBoss5/Java6 is taking 2-5sec on JBoss7/Java6 or 7. This happens only when i run on a linux machine. the machine itself have 8Gig+ free memory and is a Xeon processor. Everything runs normal when i run it on an OS X server/laptop