Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Performance - XA Vs Non XA

 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is a non XA JDBC driver faster/more efficient than a XA JDBC driver ?

I am considering shifting some data sources to use XA drivers. They participate in cross database transactions. However the part of code where they participate in cross database transactions is not very large (a few scenarios only). My question is, would making this data source use a XA driver all the time bring down the performance ? If so are there any studies or recommendations to back that ?

My other option is to split the data source to XA and non XA types if performance is of concern
 
jimmy jones
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There has to be some overhead to using an XA driver rather than a non XA driver. What database are you using?

I have found that changing to SQL Servers XA driver to to the had a very bad impact in performance, it caused a significant increase in database locking under load. Fortunately I was using Weblogic which allows you to emulate XA for 1 non XA datasource so there was no need to use the SQL Server XA driver, it might be worth checking your application servers documentation for a similar feature.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jimmy jones:
There has to be some overhead to using an XA driver rather than a non XA driver. What database are you using?

I have found that changing to SQL Servers XA driver to to the had a very bad impact in performance, it caused a significant increase in database locking under load. Fortunately I was using Weblogic which allows you to emulate XA for 1 non XA datasource so there was no need to use the SQL Server XA driver, it might be worth checking your application servers documentation for a similar feature.


I am using weblogic 9. However the emulate 2 phase commit option is kinda like a dummy implementation of a XA resource. In other words if your resource fails a transaction it will still say that it is prepared to commit and the other parties in the transaction will commit as well. It could lead to some inconsistencies in the application.

I cannot use the emulate option here since I am opening a transaction and allowing it to span across two databases. If I emulate the 2PC I get an error that says I am not allowed to make two non XA resource take part in a transaction involving two different databases. I initially thought that the emulate option would bypass any such errors. Oh well. I guess I ll split the datasource to XA and non XA types to avoid any performance problems.

I am using Sybase by the way
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic