3 Replies Latest reply on Dec 27, 2005 7:38 PM by Manjula Jayaraman

    Need help with JBoss connection pooling and performance!

    Manjula Jayaraman Newbie

      Hi All,

      We currently have a legacy application server which does not do any connection pooling. We've recently ported this application to JBoss. When we ran the performance tests against both these servers, we found that our JBoss version of the server is taking more time compared to the legacy one. We've spent quite some time reading various wiki pages, posts etc but still unable to resolve the issue.

      Here's the actual problem.

      On our server ported to JBoss (running on 4.0.1sp1 on JDK 1.4.2 on Mac OS X 10.4.3), we found that as the JBoss does connection pooling, the time taken by JBoss to get the connection from the pool and change the switch the db username and password seems to be significant.

      For example, we ran the same queries against our legacy server and new server returning the same set of results. In this case, for the first time, as our legacy server needs to establish connection with the DB, it takes more time than our JBoss based server. But for the subsequent queries (SAME QUERIES), our legacy server's response time is better. Our legacy server takes 6978ms and the JBoss based server is taking 7976ms. The difference is huge.

      In our JBoss based server, we are using JBoss for connection pooling but we are not USING EJB or anything else. We are using JDBC APIS directly once we get the connection including creating prepared statement, executing the query and getting the results from the database.

      We've spent almost 2-3 weeks on this trying out various things including Yourkit profiler. But we are unable to tune our JBoss based server to match the performance of our legacy server. It is very important for us to be able to match the performance of our legacy server otherwise we will NOT be able to JUSTIFY the use of JBoss in our organization. This is the first application on JBoss.


      Could someone please throw some light on what could possibly be the reason why there is a significant difference in performance and how can we improve this?

      Thanks in advance for your input!