Benchmark

October 28, 2024 ยท View on GitHub

MySQL -> MySQL

Use sysbench to generate snapshot data and binlogs.

Run tests with ape_dts and debezium.

Test Environment

The source database, target database, and data migration task are located on 3 Baidu BCC machines within the same network, each with a specification of 8c16g.

MySQL Specifications

SourceTarget
Versionmysql:8.2.0mysql:8.2.0
Specs8c16g8c16g

Snapshot migration

Generate 10 tables through sysbench oltp_read_write, each with 5,000,000 records.

sysbench oltp_read_write --mysql-host=192.168.80.3 --mysql-port=3307 --mysql-user=root --mysql-password=123456 --mysql-db=sbtest --tables=10 --table-size=5000000 --threads=10 prepare

Results

MethodNode SpecsRPS(rows per second)Source MySQL Load (CPU/Memory)Target MySQL Load (CPU/Memory)
ape_dts1c2g714288.2% / 5.2%211% / 5.1%
ape_dts2c4g9940314.0% / 5.2%359% / 5.1%
ape_dts4c8g12658213.8% / 5.2%552% / 5.1%
debezium4c8g405121.5% / 5.2%51.2% / 5.1%
  • According to debezium official: RPS varies between 2000 and 6000 depending on batch.size and the storage format of data in Kafka.

CDC synchronization

Case 1: Updates on 10 tables

Generate binlogs on 10 tables through sysbench oltp_update_index, about 3,200,000 records.

sysbench oltp_update_index --mysql-host=192.168.80.3 --mysql-port=3307 --mysql-user=root --mysql-password=123456 --mysql-db=sbtest --tables=10 --table-size=5000000 --threads=100 --time=1200 --report-interval=10 run

Results

MethodNode SpecsRPS(rows per second)Source MySQL Load (CPU/Memory)Target MySQL Load (CPU/Memory)
ape_dts1c2g1190219.0% / 5.2%479% / 5.1%
ape_dts2c4g1424018.6% / 5.2%623% / 5.1%
ape_dts4c8g1945019.2% / 5.2%689% / 5.1%
debezium4c8g317517.9% / 5.2%118% / 5.1%

Case 2: Updates on 1 table

Generate binlogs on 1 table through sysbench oltp_update_index, about 3,200,000 records.

sysbench oltp_update_index --mysql-host=192.168.80.3 --mysql-port=3307 --mysql-user=root --mysql-password=123456 --mysql-db=sbtest --tables=10 --table-size=5000000 --threads=100 --time=1200 --report-interval=1 run

Results

MethodNode SpecsRPS(rows per second)Source MySQL Load (CPU/Memory)Target MySQL Load (CPU/Memory)
ape_dts1c2g1500218.8% / 5.2%467% / 6.5%
ape_dts2c4g2469218.1% / 5.2%687% / 6.5%
ape_dts4c8g2628718.2% / 5.2%685% / 6.5%
debezium4c8g295120.4% / 5.2%98% / 6.5%