Configure detailed transaction-level statistics collection for in-depth performance analysis.
Experimental Feature: Per transaction stats are currently classified as an experimental feature. While this feature is supported, it is subject to refinement and change in future releases.
Performance Impact: Users are advised to carefully test the performance impact of enabling per transaction stats particularly when operating under load, as collection and reporting of these stats can be quite costly in terms of CPU usage, disk write bandwidth, and disk space usage.
Overview
Per-transaction stats provide detailed statistics for each transaction and message at the cost of greater overhead. Unlike aggregated engine statistics, per-transaction stats record timestamps and metrics for every transaction, allowing granular analysis of performance outliers and bottlenecks.
Configuration
Per-transaction stats collection requires enabling both global latency collection and per-transaction capture:
With the above configuration, the application will create a processor.txnstats.log in the application's data directory. At the end of each transaction, an AepMonTransactionStatsMessage will be saved to this transaction log file which contains the captured stats for that transaction.
Configuration Parameters
Configuration Setting
Description
capturePerTransactionStats
Enables per-transaction statistics collection. Requires captureTransactionLatencyStats to also be enabled.
perTransactionStatsLogging
Configures the dedicated binary transaction log for per-transaction stats. Policy should be set to UseDedicated
flushOnCommit
Whether to flush stats to disk after each transaction commit. Set to true for immediate persistence.
detachedWrite
Configures detached writing to offload I/O from the dispatcher thread. Should generally be enabled.
queueOfferStrategy
Strategy for offering messages to the detached write queue. Use SingleThreaded for single-threaded dispatchers.
queueWaitStrategy
Wait strategy for the detached write disruptor. Blocking is appropriate for non-latency-critical logging.
queueDrainerCpuAffinityMask
CPU affinity mask for the detached write thread.
Prerequisites
Per-transaction stats collection requires the following global settings to be enabled: