[MDEV-31676] Innodb history length keeps growing Created: 2023-07-13  Updated: 2024-01-26  Resolved: 2023-07-17

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.6.14
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Gerwin Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

RHEL 8


Issue Links:
Relates
relates to MDEV-30628 10.6 performance regression with sust... Needs Feedback
relates to MDEV-33213 History list is not shrunk unless the... Closed

 Description   

I have a server where the history length keeps growing. At first we had them in shared system space but we moved them with using innodb_undo_tablespaces. This did not helped us either.

Right now the length is 124355327 and the server is not making transactions right now (for 1 hour) just to see if the purge starts. It's pretty idle.

Ihave the following parameters, most of them are extreme just to trigger some purge actions.

{{MariaDB [(none)]> show global variables like "innodb%purge%";

innodb_max_purge_lag 50000
innodb_max_purge_lag_delay 0
innodb_max_purge_lag_wait 4294967295
innodb_purge_batch_size 300
innodb_purge_rseg_truncate_frequency 1
innodb_purge_threads 32
innodb_undo_log_truncate 1

innodb status:

Purge done for trx's n:o < 258032014 undo n:o < 5633661 state: running
History list length 124560317

Looks a little bit like #MDEV-29401 but that one should be fixed by the version we are already using.



 Comments   
Comment by Gerwin [ 2023-07-17 ]

Sorry this isn't a bug. I made a miscalculation in de undo logsizes where I triggered lazy purging.

Comment by Marko Mäkelä [ 2023-08-07 ]

This could still be a genuine problem, or at least I believe that this is related to the open ticket MDEV-30628.

What was done in MDEV-29601 was that the existing throttling mechanism was improved slightly.

Based on the configuration parameters that you posted, the throttling should not be activated at all, because innodb_max_purge_lag_delay=0.

MDEV-31382 is one more bug in this area: Even if the history list length reached 0, the undo tablespaces might not be truncated despite innodb_undo_log_truncate=ON.

Comment by Marko Mäkelä [ 2023-11-14 ]

MDEV-32050 in MariaDB Server 10.6.16 removed several performance bottlenecks from the purge subsystem.

Comment by Marko Mäkelä [ 2024-01-26 ]

MDEV-33213 was a further fix in this area. While MDEV-32050 made the purge faster, MDEV-33213 fixes a starvation problem and ensures that newly started transactions will not prevent already processed undo logs for older transactions from being freed.

Generated at Thu Feb 08 10:25:39 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.