Note that this feature is currently ONLY available in v7.2.1 of the Tungsten products
The trepctl perflog command adds real-time performance monitoring to track and identify slow database operations during replication. The feature provides visibility into transaction, event, and statement execution times with configurable thresholds for alerting.
trepctl perflog [ -commit-threshold ] [ -disable ] [ -enable ] [ -event-threshold ] [ -statement-threshold ]
Where:
Table 8.39. trepctl perflog Command Options
| Option | Description |
|---|---|
-commit-threshold | Sets the threshold for logging slow commits (Default: 1000, i.e. 1 seconds, value supplied as milliseconds). |
-disable | Disable performance logging |
-enable | Enable performance logging |
-event-threshold | Sets the threshold for logging slow events (Default: 300000 i.e. 5 minutes, value supplied as milliseconds). |
-statement-threshold | Sets the threshold for logging slow statements (Default: 5000 i.e. 5 seconds, value supplied as milliseconds). |
Key Features
Performance Metrics Tracked:
Transactions, Events, and Statements
Maximum, average, and rolling window statistics
Dedicated perf.log file with 10MB rotation
Slow Operation Detection:
Configurable thresholds (defaults: commit 1s, statement 5s, event 5min)
Detailed warnings with SQL text and event context
Automatic logging when thresholds exceeded (will be logged whether performance logging is enabled or not)
Runtime Configuration
To enable, with custom thresholds, issue with the trepctl. The following example
shows setting the commit-threshold and statement-threshold.
Values are specific in milliseconds.
shell> trepctl -service <service-name> perflog -enable \
-commit-threshold 2000 \
-statement-threshold 10000To enable, with a custom event threshold:
shell> trepctl -service <service-name> perflog -enable \
-event-threshold 600000To enable, with default thresholds, for all replicator services in a multi-service configuration:
shell> trepctl -all-services perflog -enableTo disable:
shell> trepctl -service <service-name> perflog -disable
It is also possible to change the thresholds without the need to enable or disable. In this
example the commit-threshold is being set to 0, which has the affect of setting it to the
default value (1 second)
shell> trepctl -service <service-name> perflog -commit-threshold 0
The following shows example of the output found in the perf.log:
Slow statement : 2026/01/14 15:26:09.722 | 721 | q-to-dbms-0 | WARN | SLOW OP |Slow statement detected (6002 ms) when applying Event #401629/0 : insert into test.test721(v) select sleep(6)
Slow event in progress : (multi fragments events only -- logged for every fragments once the threshold is reached) 2026/01/14 15:28:33.904 | 721 | q-to-dbms-0 | WARN | SLOW OP |Slow event in progress (18008 ms so far) : Event #411630/0
Slow event (when totally applied) : 2026/01/14 15:29:15.934 | 721 | q-to-dbms-0 | WARN | SLOW OP |Slow event detected (60038 ms) : Event #411630
Slow commit : 2026/01/14 14:12:58.998 | 721 | q-to-dbms-0 | WARN | SLOW OP |Slow commit detected (1011 ms)
Performance logging : 2026/01/14 15:37:05.696 | 721 | l-3-thread-1 | INFO | Type |Count |Max time (ms) |Average (ms) |Roll min time (ms) |Roll max time (ms) |Roll average (ms) 2026/01/14 15:37:50.117 | 721 | q-to-dbms-0 | INFO | EVENT |8192 |4 |0,27 |0 |2 |0,26 2026/01/14 15:37:53.949 | 721 | q-to-dbms-0 | INFO | TRANSACTION |1024 |7 |2,68 |0 |7 |2,68 2026/01/14 15:38:53.056 | 721 | q-to-dbms-0 | INFO | EVENT |16384 |4 |0,27 |0 |3 |0,27 2026/01/14 15:39:17.980 | 721 | q-to-dbms-0 | INFO | TRANSACTION |2048 |7 |2,63 |1 |6 |2,58 2026/01/14 15:39:24.531 | 721 | q-to-dbms-0 | INFO | STATEMENT |65536 |1 |0,06 |0 |1 |0,05
Rolling numbers are based on a moving window of the last 1024 entries.