Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-30000

make mariadb-backup to force an innodb checkpoint

Details

    Description

      Since MDEV-23855 InnoDB can do checkpoints much more rarely. This improves performance under write-heavy load, but makes mariadb-backup create huge incremental backups (since the last checkpoint).

      One way to solve it would be to let mariadb-backup to force an InnoDB checkpoint before a backup. There are many ways of doing it, innodb.page_cleaner test shows one of them, marko knows more. Perhaps it should be optional, but, likely, enabled by default.

      Alternatively, InnoDB can force a checkpoint automatically when entering a certain backup stage.

      Attachments

        Issue Links

          Activity

            I think that

            SET GLOBAL innodb_log_checkpoint_now=ON;
            

            would be the best approach. It clearly says what's to be done, doesn't make any system-wide changes that need to be restored (so, no problems if the client suddenly disconnects). Let's do that?

            serg Sergei Golubchik added a comment - I think that SET GLOBAL innodb_log_checkpoint_now= ON ; would be the best approach. It clearly says what's to be done, doesn't make any system-wide changes that need to be restored (so, no problems if the client suddenly disconnects). Let's do that?

            brevilo, I don’t think that setting innodb_log_buffer_size larger than a few megabytes should help at all. The parameter innodb_log_file_size should be much more relevant.

            marko Marko Mäkelä added a comment - brevilo , I don’t think that setting innodb_log_buffer_size larger than a few megabytes should help at all. The parameter innodb_log_file_size should be much more relevant.
            brevilo Oliver Bock added a comment - - edited

            Ooops, my bad, I meant innodb_log_file_size = 64 GB, not innodb_log_buffer_size (still at the default of 16 MB!).

            I fixed my previous comment above but since that was meant as a reply to your's it kind of lost its context now Maybe it helps anyway...

            brevilo Oliver Bock added a comment - - edited Ooops, my bad, I meant innodb_log_file_size = 64 GB , not innodb_log_buffer_size (still at the default of 16 MB!). I fixed my previous comment above but since that was meant as a reply to your's it kind of lost its context now Maybe it helps anyway...

            10.11 and up looks appropriate

            serg Sergei Golubchik added a comment - 10.11 and up looks appropriate

            I introduced the parameter --skip-innodb-log-checkpoint-on to backup, so that the extra checkpoint at the start of the backup can be avoided when necessary. This is necessary in the regression test encryption.doublewrite_debug.

            marko Marko Mäkelä added a comment - I introduced the parameter --skip-innodb-log-checkpoint-on to backup, so that the extra checkpoint at the start of the backup can be avoided when necessary. This is necessary in the regression test encryption.doublewrite_debug .

            People

              marko Marko Mäkelä
              serg Sergei Golubchik
              Votes:
              9 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.