The transaction manager makes it possible to commit and roll back distributed transactions.
A distributed transactional system writes transactional activity into transaction logs so that they can be recovered later. But writing transactional logs has some performance penalty.
You can also enable monitoring with these commands:
set serverInstance.transaction-service.monitoringEnabled=true reconfig serverInstance
When you have enabled monitoring of the transaction service, view results
With Admin Console at Standalone Instances > server-name (Monitor | Monitor). Select transaction-service from the View dropdown.
With this command:
asadmin get -m serverInstance.transaction-service.*
The following statistics are gathered on the transaction service:
total-tx-completed Completed transactions.
total-tx-rolled-back Total rolled back transactions.
total-tx-inflight Total inflight (active) transactions.
isFrozen Whether transaction system is frozen (true or false)
inflight-tx List of inflight (active) transactions.
Here is a sample of the output using asadmin:
********** Stats for JTS ************ total-tx-completed = 244283 total-tx-rolled-back = 2640 total-tx-inflight = 702 isFrozen = False inflight-tx = Transaction Id , Status, ElapsedTime(msec) 000000000003C95A_00, Active, 999
To disable distributed transaction logging with the Admin Console, go to Configurations > config-name > Transaction Service. Click on Add Property, and specify:
You can also set this property with asadmin, for example:
asadmin set server1.transaction-service.disable-distributed-transaction-logging=true
Setting this attribute to true disables transaction logging, which can improve performance. Setting it to false (the default), makes the transaction service write transactional activity to transaction logs so that transactions can be recovered. If Recover on Restart is checked, this property is ignored.
Set this property to true only if performance is more important than transaction recovery.
To set the Recover on Restart attribute with the Admin Console, go to Configurations > config-name > Transaction Service. Click the Recover check box to set it to true (checked, the default) or false (un-checked).
You can also set automatic recovery with asadmin, for example:
asadmin set server1.transaction-service.automatic-recovery=false
When Recover on Restart is true, the server will always perform transaction logging, regardless of the Disable Distributed Transaction Logging attribute.
If Recover on Restart is false, then:
If Disable Distributed Transaction Logging is false (the default), then the server will write transaction logs.
If Disable Distributed Transaction Logging is true, then the server will not write transaction logs.
Not writing transaction logs will give approximately twenty percent improvement in performance, but at the cost of not being able to recover from any interrupted transactions. The performance benefit applies to transaction-intensive tests. Gains in real applications may be less.
The keypoint interval determines how often entries for completed transactions are removed from the log file. Keypointing prevents a process log from growing indefinitely.
Frequent keypointing is detrimental to performance. The default value of the Keypoint Interval is 2048, which is sufficient in most cases.