CDC test

更新时间:
复制 MD 格式

This topic describes the design, procedure, and results of a change data capture (CDC) node performance test for PolarDB-X. Use it as a reference to evaluate CDC node performance in your own instance.

Background

CDC nodes act as log nodes in a PolarDB-X instance, providing a binary logging service compatible with MySQL binary logs. Subscribe to and consume binary logs from CDC nodes to meet requirements across different business scenarios.

This topic uses TPC Benchmark C (TPC-C), Sysbench, and Large Transaction to evaluate CDC node performance. The following metrics measure performance. For details, see Log resource monitoring.

Metric Abbreviation Description When to pay attention
Delay Time DT Latency for processing binary log events. Unit: milliseconds. Sustained increases indicate that CDC nodes are falling behind the upstream write rate.
Bytes Per Second BPS Data size of binary log events processed per second. Unit: byte/s. Drops during large-transaction workloads indicate that disk I/O is involved. See Large Transaction results.
Events Per Second EPS Number of binary log events processed per second.
Transactions Per Second TPS Number of transactions processed per second. All transactions in binary logs are counted.

Test design

Instance specifications

Node type Specifications Number of nodes
Compute node 32 vCPUs, 128 GB of memory 12
Data node 32 vCPUs, 128 GB of memory 16
CDC node 16 vCPUs, 32 GB of memory 2

Stress test environment

ECS instance type: ecs.hfc6.16xlarge (64 vCPUs, 128 GB of memory)

To generate large volumes of traffic, you may need more than one Elastic Compute Service (ECS) instance.

Procedure

TPC-C

Follow the procedure in TPC-C test with the following settings:

  • In props.mysql, set warehouses to 2000.

  • In props.mysql, set runMins to 10.

  • In runBenchmark.sh, set the Java Virtual Machine (JVM) heap size to -Xms60g -Xmx60g.

Sysbench

Follow the procedure in Sysbench test. Adjust the number of concurrent threads to generate different traffic volumes.

oltp_write_only

sysbench --config-file='sysb.conf' --db-ps-mode='disable' --skip-trx='off' \
  --mysql-ignore-errors='all' --tables='16' --table-size='10000000' \
  --threads={Number of concurrent threads} oltp_write_only run

oltp_insert

sysbench --config-file='sysb.conf' --db-ps-mode='disable' --skip-trx='on' \
  --mysql-ignore-errors='all' --tables='16' --table-size='10000000' \
  --threads={Number of concurrent threads} oltp_insert run

Large Transaction

Download large_transaction.sql to construct transactions of varying sizes. Inserting 200,000 rows produces a transaction of 500 MB.

Test results

TPC-C

tpmC DT (ms) BPS (MB/s) EPS TPS
260,293.98 60 65 307,403 9,078
515,425.45 80 128 601,757 17,980
783,525.69 100 197 956,529 27,935
1,087,352.38 120 270 1,292,464 38,867
1,283,716.12 150 325 1,549,433 45,968
1,500,365.16 220 380 1,810,926 53,592
TPC-C test results chart 1TPC-C test results chart 2TPC-C test results chart 3

Sysbench

oltp_write_only

QPS DT (ms) BPS (MB/s) EPS TPS
106,081.68 45 34 274,068 17,761
215,321.43 60 68 532,190 35,672
302,061.64 100 97 788,396 50,560
408,594.41 287 128 1,023,873 68,702
518,068.92 420 152 1,201,216 84,654
Sysbench oltp_write_only results chart 1Sysbench oltp_write_only results chart 2Sysbench oltp_write_only results chart 3

oltp_insert

QPS DT (ms) BPS (MB/s) EPS TPS
50,984.67 46 25 309,384 50,984.67
106,907.38 95 51 645,040 106,907.38
155,172.85 145 75 935,367 155,172.85
206,096.27 267 99 1,230,641 206,096.27
252,280.43 275 123 1,519,752 252,280.43
306,653.64 388 149 1,843,716 306,653.64
352,615.63 920 173 2,136,066 352,615.63
Sysbench oltp_insert results chart 1Sysbench oltp_insert results chart 2Sysbench oltp_insert results chart 3

Large Transaction

Binary log operations such as sorting and merging behave differently based on whether transaction data fits in memory:

  • Data volume < 10 GB: All binary log operations occur in memory. BPS reaches 500 MB/s.

  • Data volume > 10 GB: Binary log operations spill to disk, reducing BPS to 350 MB/s.

Transaction size DT (ms) BPS (MB/s) EPS
0.5 GB 2,000 500 24
1 GB 4,800 500 24
2 GB 7,800 500 24
3 GB 9,400 500 24
4 GB 12,500 500 24
5 GB 17,000 500 24
10 GB 55,000 350 22
20 GB 115,000 350 22
Large Transaction test results