[jbossts-issues] [JBoss JIRA] Commented: (JBTM-611) performance tune transaction reaper
Jonathan Halliday (JIRA)
jira-events at lists.jboss.org
Thu Aug 27 06:33:23 EDT 2009
[ https://jira.jboss.org/jira/browse/JBTM-611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12482990#action_12482990 ]
Jonathan Halliday commented on JBTM-611:
5 threads: reaper insert 1.6%, reaper remove 1.2% of total runtime.
20 threads: reaper insert 3%, remove 3.6%.
5 threads insert 1.7%, remove 1%
20 threads insert 1.8% remove 0.7%
hmm, looks like the scaling problem is a bit more in hand :-)
> performance tune transaction reaper
> Key: JBTM-611
> URL: https://jira.jboss.org/jira/browse/JBTM-611
> Project: JBoss Transaction Manager
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Components: Transaction Core
> Affects Versions: 4.7.0
> Reporter: Jonathan Halliday
> Assignee: Jonathan Halliday
> Fix For: 4.8.0
> In situations where a large number of tx are being created and destroyed concurrently, the TransactionReaper represents a potential bottleneck due to the necessary synchronization. For most worklolads this is insignificant as it is dominated by the objectstore I/O. However, for tx scenarios that don't write the store (1PC, local resources, etc) it's a potential problem, so it's worth tuning a bit.
> There are some things we can do to reduce the workload inside the synchronized scope.
> 1- ReaperElements are kept in a sorted list, by expiry time. To impose the total ordering required by SortedSet, items with the same expire time (to the nearest ms) are distinguished by Uid. This is an expensive comparison. Introduce a sequence number or other cheap (i.e. int) element to the sort order so as to lessen the comparison (i.e. set insert/remove) cost.
> 2 - When a new tx is inserted into the reaper queue, we can avoid waking the reaper and having it recalculate the sleep interval, provided the new tx is not at the head of the queue i.e. does not have an expire time earlier than the existing wakeup time.
> 3 - Some debug logging is performed in synchronized blocks. Whilst this should not be removed, we can ensure it correctly checks the log threshold configuration, as generating log output statements unnecessarily is expensive
> 4 - The transactions and timeouts collections are currently synchronized Collections. Since almost all access to them is guarded by a lock on the TransactionReaper instance, they could be replaced by unsynchronized versions with a little work. This may or may not be helpful.
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbossts-issues