DML Commit Stuck in Binlog Prewrite Waiting Time

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

Original topic: dml提交卡在Binlog Prewrite 等待耗时

| username: xxxxxxxx

To improve efficiency, please provide the following information. A clear problem description will help resolve the issue faster:

[TiDB Usage Environment]
Version 4.0.13, 3 TiKV, 3 TiDB, 3 PD, 3 Pump

[Overview] Scenario + Problem Description
Received an alert TiDB_binlog_error_total, and there is also feedback from the business that the cluster is slow in writing. After testing, it was indeed found to be very slow. Deleting a record based on the primary key takes a long time, taking more than ten seconds to complete the deletion.

There is no disk pressure or CPU load on the machine where the pump is located, and there are no error logs in the three pump components (grep -i err log/pump.log). I would like to ask what should be checked in this situation.

Additionally, disabling the pump component (binlog.enable: false) resolves the issue, so the problem should be with the pump component, but I am not sure how to locate it.

Another issue is that executing DDL operations, such as creating a new database and creating a new table, is extremely slow.

| username: WalterWj | Original post link

The binlog of TiDB is written to the pump synchronously during the prewrite phase. From your description, is the disk write slow? You can check the response latency of the pump’s disk and monitor the disk performance.

| username: system | Original post link

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