analyze_replay_performance.py

After a database initialization completes, run the analyze_replay_performance.py script on the processing server that serviced the replay request to analyze transaction replay throughput statistics, including the checkpoint creation time, any throttling, the number of transactions replayed, and the duration to replay them. Look for database initialization requester or start sending in-memory database replay to peer cluster log messages to find the processing server on which to run the script. The script uses the mtx_debug.log file to analyze the replay performance because the server where it is run drove the replay, both locally and remotely.

Syntax

[-h] [-d] [-c] [-s] [-v]

Options

The analyze_replay_performance.py script has the following command line options.

-h, --help
Help about the script options.
-d, --debug
Increments the debug flag count. The higher the debug flag count, the more debugging output is produced.
-c checkpoint, --checkpoint checkpoint
The name of the checkpoint file in the mtx_debug.log file to analyze. If you do not specify this option, the script uses the mtx_debug.log file.
-s remote_server_start_time, --start-time remote_server_start_time
Specifies the Transaction Server start time. For local replay, this time is detected by the system. For remote replay, the time must be specified in the form YYYY-MM-DD hh:mm:ss.msec
-v, --verbose
Increases the verbosity of the script. Doing so causes more messages and statistics to be printed. By default, the verbosity is set to 0.

Local Transaction Replay Non-Verbose Mode

Note: Total replay times and transactions per second (TPS) for individual databases are estimated, due to multi-threading. Overall replay time and TPS are exact.
analyze_replay_performance.py mtx_debug.log

Replay target:                2:1:1:1:0:1
Replay checkpoint name:       in-memory database
Service start time:           2014-07-23 21:50:25.404337
Replay request time:          2014-07-23 21:50:25.404337
Replay start:                 2014-07-23 21:50:26.033924
Replay completion:            2014-07-23 21:50:40.304745
Replay duration (checkpoint): 0:00:14.270820
Replay duration (total):      0:00:14.270820
Total startup time:           0:00:14.900408
Replay threads:               1
Local replay throttle:        128 Messages Outstanding
Remote replay throttle:       1 Batches Outstanding (Max 128 Messages per Batch)

DATABASE                      File Count  Txn Count    Replay Time        Txn/Sec
Overall                              5      96841    0:00:14.270820      6785.94

subscriber_db                        1      59854    0:00:09.155952*     6537.17*
balance_set_db                       1      15053    0:00:02.304713*     6531.40*
activity_db                          1      20000    0:00:03.069597*     6515.51*
sched_db                             0          0    N/A           *         N/A*
event_db                             1          1    0:00:00.062479*       16.01*
pricing_db                           1       1933    0:00:00.798911*     2419.54*
transaction                          0          0    N/A           *         N/A*

Local Transaction Replay Verbose Mode

Note: Total replay times and TPS for individual databases are estimated due to multi-threading. Overall replay time and TPS are exact. The individual file replay time and TPS are exact.
analyze_replay_performance.py -v mtx_debug.log
Replay target:                1:1:1:1:0:1
Replay checkpoint name:       mtx_ckpt_v4500.1.1393334498
Replay request time:          2014-02-25 05:23:44.110432
Replay start:                 2014-02-25 05:23:44.112170
Replay completion:            2014-02-25 05:23:45.873697
Replay duration (checkpoint): 0.839398
Replay duration (total):      1.761527
Replay threads:               3
Local replay throttle:        128 Messages Outstanding
Remote replay throttle:       1 Batches Outstanding (Max 128 Messages per Batch)

DATABASE                      File Count  Txn Count     Replay Time     Txn/Sec
Overall                              19       3245          1.7615      1842.15

subscriber_db                         4        400        0.039158*    10215.00*
  subscriber_db_1.log.                1        136        0.030165      4508.54
  subscriber_db_2.log.gz              1        158        0.033270      4749.01
  subscriber_db_3.log.gz              1          1        0.004594       217.68
  subscriber_db_4.log.gz              1        105        0.013228      7937.74

balance_set_db                        4        100        0.062245*     1606.56*
  balance_set_db_5.log.gz             1         44        0.008844      4975.18
  balance_set_db_6.log.gz             1         11        0.009619      1143.57
  balance_set_db_7.log.gz             1         35        0.014518      2410.80
  balance_set_db_8.log.gz             1         10        0.002397      4171.78

activity_db                           4        200        0.061704*     3241.27*
  activity_db_9.log.gz                1         83        0.022846      3633.02
  activity_db_10.log.gz               1         69        0.015164      4550.21
  activity_db_11.log.gz               1         38        0.012051      3153.24
  activity_db_12.log.gz               1         10        0.016506       605.84

sched_db                              1          0        0.000139*        0.00*
  sched_db_13.log.gz                  1          0        0.000139         0.00

event_db                              4        400        0.078254*     5111.56*
  event_db_14.log.gz                  1        187        0.045881      4075.76
  event_db_15.log.gz                  1         51        0.012566      4058.62
  event_db_16.log.gz                  1        117        0.020534      5697.86
  event_db_17.log.gz                  1         45        0.010229      4399.31

pricing_db                            1       1845        0.245975*     7500.76*
  pricing_db.log.gz                   1       1845        0.245975      7500.76

transaction                           1        300        0.021305*    14081.15*
  transaction_1_1_2_334504_5.log.gz   1        300        0.021305     14081.15
 

Remote Transaction Replay

analyze_replay_performance.py mtx_debug.log
**** NOTE: Cannot determine server start time for remote server.
           Assuming replay request start time.
           Use the --start-time option to specify the server start time.
Source code version:          5220 revision 80766
Replay target:                2:1:1:1:0:1
Replay checkpoint name:       in-memory database
Service start time:           2021-02-27 15:38:29.974376
Replay request time:          2021-02-27 15:38:29.974376
Replay start:                 2021-02-27 15:38:32.994842
Replay completion:            2021-02-27 15:38:48.474500
Replay duration (checkpoint): 0:00:15.479657
Replay duration (total):      0:00:15.479657
Total startup time:           0:00:18.500123
Replay threads:               1
Local replay throttle:        128 Messages Outstanding
Remote replay throttle:       1 Batches Outstanding (Max 128 Messages per Batch)

DATABASE                                   File Count  Txn Count    Replay Time        Txn/Sec
Overall                                             6      37153    0:00:15.479657      2400.12

subscriber_db                                       1      12000    0:00:08.985681*     1335.46*
balance_set_db                                      1       2000    0:00:04.417732*      452.72*
activity_db                                         1       4020    0:00:05.653089*      711.12*
sched_db                                            1         35    0:00:00.062991*      555.63*
event_db                                            1       8522    0:00:04.701598*     1812.57*
pricing_db                                          1      10576    0:00:14.457673*      731.51*
alert_db                                            0          0    N/A           *         N/A*
transaction                                         0          0    N/A           *         N/A*
* Note: Aggregate replay times and TPS for individual
        databases is approximate due to multi-threading.
        Overall replay time and TPS are accurate.