Improving federated two-phase commit performance

You can take steps to improve the performance of transactions in a federated two-phase commit configuration.

Consider the following possible configurations:

  • In order to reduce the time spent writing the additional log records to the federated server, place the federated database log files on a device that is capable of fast write transactions, preferably a device that has a write cache. Generally, the federated server log write transactions cause most of the additional processing time. Correct placement of the log files is likely to improve the two-phase commit performance. This improvement is particularly true for read-only transactions. The placement of the federated server log files is controlled by the NEWLOGPATH database configuration parameter.
  • For insert, update, and delete transactions, place the remote data source log files on media that are capable of fast writes.
  • To reduce the overhead introduced by additional XA messages that are sent between the federated server and data sources:
    • Place the federated server on the same computer as one of the two-phase commit data sources.
    • If you cannot place the federated server on the same computer as a data source, increase the network speed and reduce latency between the federated server and the data sources to help improve performance.

For applications, only enable two-phase commit for a data source when at least one transaction in the application requires two-phase commit. For each server, set the default value for DB2_TWO_PHASE_COMMIT to N and use the SET SERVER OPTION statement to enable two-phase commit within the applications that specifically require two-phase commit.