TiDB DML operations cause memory surge in TiCDC, what are the optimization solutions?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb dml操作,ticdc会出现内存暴涨,有什么优化方案

| username: TiDBer_5tH0P61g

【TiDB Usage Environment】Production environment
【TiDB Version】
【Reproduction Path】Can be reproduced by initializing DML operations in the test environment
【Encountered Issue】TiDB monitoring found that during insert operations, TiCDC experiences a memory surge
【Resource Configuration】TiCDC and TiKV are deployed on the same host
【Attachments: Screenshots/Logs/Monitoring】

| username: 昵称想不起来了 | Original post link

What version is it? Did you run a large transaction?

Starting from version v6.2, TiCDC supports the feature of splitting single-table transactions, which can significantly reduce the latency and memory consumption of synchronizing large transactions. Therefore, in scenarios where the business does not have high requirements for transaction atomicity, it is recommended to enable the transaction splitting feature by setting the sink uri parameter transaction-atomicity to solve potential synchronization delays and OOM issues.

Additionally,

  • When using TiCDC to synchronize wide tables with larger single rows (> 1k), it is recommended to set the TiCDC parameter per-table-memory-quota, so that per-table-memory-quota = ticdcTotalMemory / (tableCount * 2). ticdcTotalMemory is the memory of a TiCDC node, and tableCount is the number of target tables synchronized by a TiCDC node.
| username: Fly-bird | Original post link

Add more memory

| username: zhanggame1 | Original post link

Why did the insert operation surge? Is there a large transaction?

| username: TiDBer_5tH0P61g | Original post link

version: v5.2.3

| username: TiDBer_5tH0P61g | Original post link

Yes, there are large transactions.

| username: TiDBer_5tH0P61g | Original post link

This issue should be encountered frequently.

| username: TiDBer_5tH0P61g | Original post link

Strength does not allow it.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.