Bug #109314 Undo data takes a long time to be cleared
Submitted: 8 Dec 2022 8:12 Modified: 8 Dec 2022 13:02
Reporter: jinwei shen Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0.25 OS:Any
Assigned to: CPU Architecture:Any

[8 Dec 2022 8:12] jinwei shen
Description:
The undo command takes a long time to clear data. The data occupies 155 GB and the undo occupies 200 GB. After services are stopped, it takes five days to clear the undo. 
The corresponding parameter information are as flow:
innodb_purge_threads 4
innodb_max_undo_log_size 1073741824
innodb_purge_rseg_truncate_frequency  128

I don't think the current configuration of these parameters should cause the undo cleanup to be too slow.

How to repeat:
Run the sysbench script 64*10000000 for a long time(around 5days)

Suggested fix:
Can the purge function be enhanced or purge parameters be adjusted adaptively?
[8 Dec 2022 13:02] MySQL Verification Team
Hi Mr. shen,

Thank you for your bug report.

However, it is not a bug.

For the undo log of that size and for the configuration that you use, this is expected time for clearing the undo log. Particularly if you use HDD for that purpose, without RAID 1+0 configuration.

You can either reconfigure your InnoDB settings or improve your hardware. Regarding the settings, you will find all the info necessary in our Reference Manual.

Not a bug.