[MDEV-33072] Buffer pool synchronization between master and slave Created: 2023-12-19  Updated: 2023-12-19

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: zhangyuan Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MDEV-33066 Tencent requested features Open

 Description   

1. snapshot
To snapshot a bufferpool, call the statement below at master side:

  • SET GLOBAL innodb_buffer_pool_snapshot_now=ON;

Two triggers are introduced to snapshot bufferpool:

  • SET GLOBAL innodb_buffer_pool_snapshot_interval=120;
  • SET GLOBAL innodb_buffer_pool_snapshot_threashold=10;
    Set variables above to 0 to disable them.

Use the innodb_buffer_pool_snapshot_pct charge the hottest N% of
bufferpools that are snapshotted:

  • SET GLOBAL innodb_buffer_pool_snapshot_pct=60;

Use the innodb_buffer_pool_snapshot_status to observe the behavior of the snapshot:

  • SHOW status LIKE innodb_buffer_pool_snapshot_status;

2. transmit
Slave can take the initiative to copy ib_bp_info file from master node,
call the statement below to configure it:

  • SET GLOBAL innodb_buffer_pool_transmit_enabled=ON;
  • SET GLOBAL innodb_buffer_pool_transmit_interval=120;

Use the innodb_buffer_pool_transmit_status to observe the behavior
of the transmit:

  • SHOW status LIKE innodb_buffer_pool_transmit_status;

3. recover
To recover a bufferpool, call the statement below at slave side:

  • SET GLOBAL innodb_buffer_pool_recover_now=ON;

One trigger is introduced to recover bufferpool, If the variable below set,
bufferpool recovery will be executed after each transmition:

  • SET GLOBAL innodb_buffer_pool_recover_after_transmit=ON;

It may take up to several minutes to restore the buffer pool.
To Abort a current running recovery of bufferpool, call the statement below at slave side:

  • SET GLOBAL innodb_buffer_pool_recover_abort=ON;

Use the innodb_buffer_pool_snapshot_pct to set the maximum number of pages
that can be loaded during the recovery process:

  • SET GLOBAL innodb_buffer_pool_recover_pct=60;

Use the innodb_buffer_pool_recover_status to observe the behavior of the recover:

  • SHOW status LIKE innodb_buffer_pool_recover_status;

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