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

Introduce a reduced doublewrite mode, handling error detection only

Details

    • 10.3.1-2

    Attachments

      Issue Links

        Activity

          Thank you for confirming my analysis.
          Compared to innodb_doublewrite=0 and reading the recently written page identifiers from the redo log (starting from a recent or the latest checkpoint), the reduced innodb_doublewrite=2 mode could have the benefit that it might be able to record a larger number of recently written pages, especially if the most recent workload involves writing a few pages over and over, so that the redo log would only contain the few page identifiers of the busy pages.

          There is another corruption mode, of which I have some anecdotal evidence: spontaneous corruption of data that was not accessed (read or written) for a long time. As far as I understand, neither the reduced doublewrite buffer nor the redo logs would help there.

          I believe that before introducing the new innodb_doublewrite=2 mode, we should spend more effort on improving the corruption handling of InnoDB.

          marko Marko Mäkelä added a comment - Thank you for confirming my analysis. Compared to innodb_doublewrite=0 and reading the recently written page identifiers from the redo log (starting from a recent or the latest checkpoint), the reduced innodb_doublewrite=2 mode could have the benefit that it might be able to record a larger number of recently written pages, especially if the most recent workload involves writing a few pages over and over, so that the redo log would only contain the few page identifiers of the busy pages. There is another corruption mode, of which I have some anecdotal evidence: spontaneous corruption of data that was not accessed (read or written) for a long time. As far as I understand, neither the reduced doublewrite buffer nor the redo logs would help there. I believe that before introducing the new innodb_doublewrite=2 mode, we should spend more effort on improving the corruption handling of InnoDB.

          Instead of doing this, maybe we should disable the doublewrite buffering for pages that are being written for the first time. Once MDEV-12699 is implemented, we can also disable doublewrite buffering for pages that were (re)initialized by a mini-transaction.

          marko Marko Mäkelä added a comment - Instead of doing this, maybe we should disable the doublewrite buffering for pages that are being written for the first time. Once MDEV-12699 is implemented, we can also disable doublewrite buffering for pages that were (re)initialized by a mini-transaction.

          I think that MDEV-12699, MDEV-19738 and MDEV-15528 are already improving this as much as is feasible.

          Furthermore, MDEV-23855 greatly reduced the latency of the doublewrite buffer, by issuing a 128-page asynchronous write request for the entire doublewrite buffer, and filling another 128-byte doublewrite buffer in memory while one copy is being written.

          marko Marko Mäkelä added a comment - I think that MDEV-12699 , MDEV-19738 and MDEV-15528 are already improving this as much as is feasible. Furthermore, MDEV-23855 greatly reduced the latency of the doublewrite buffer, by issuing a 128-page asynchronous write request for the entire doublewrite buffer, and filling another 128-byte doublewrite buffer in memory while one copy is being written.

          For the record, MySQL 8.0.30 includes WL#14710: InnoDB: Introducing REDUCED double write mode (Facebook Contribution)
          I do not think that MySQL implements any of the following MariaDB recovery improvements yet: MDEV-12699, MDEV-19738, MDEV-15528, MDEV-24626.

          marko Marko Mäkelä added a comment - For the record, MySQL 8.0.30 includes WL#14710: InnoDB: Introducing REDUCED double write mode (Facebook Contribution) I do not think that MySQL implements any of the following MariaDB recovery improvements yet: MDEV-12699 , MDEV-19738 , MDEV-15528 , MDEV-24626 .

          I believe that MariaDB should handle corrupted pages gracefully during recovery. This was recently extensively tested in combination with MDEV-13542 and some related changes.

          marko Marko Mäkelä added a comment - I believe that MariaDB should handle corrupted pages gracefully during recovery. This was recently extensively tested in combination with MDEV-13542 and some related changes.

          People

            marko Marko Mäkelä
            jplindst Jan Lindström (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.