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

Defer change buffer merge until pages are requested

Details

    Description

      For MDEV-14481, we must defer the change buffer merge to the moment when the secondary index leaf page is requested by a user thread.

      This would also simplify MDEV-16526, because the change buffer I/O would not have to be treated as a special case.

      The change buffer format will not be changed as part of this task. That could remain part of MDEV-11634.

      As part of this, the counter innodb_ibuf_merge_usec will be removed from information_schema.innodb_metrics.

      Attachments

        1. MDEV-19514.ods
          57 kB
        2. MDEV-19514-2.ods
          74 kB
        3. MDEV-19514-3.ods
          63 kB

        Issue Links

          Activity

            It isn't possible to show the perf impact of having the change buffer enabled and then disabled for a workload by using MariaDB 11, assuming that MariaDB 11 no longer supports the change buffer.

            mdcallag Mark Callaghan added a comment - It isn't possible to show the perf impact of having the change buffer enabled and then disabled for a workload by using MariaDB 11, assuming that MariaDB 11 no longer supports the change buffer.
            marko Marko Mäkelä added a comment - - edited

            mdcallag, there are 7 major versions of MariaDB Server (10.5 through 10.11) where not much has been changed with regard to the change buffer. It was disabled by default in MDEV-27734 (10.5), deprecated in MDEV-27735 (10.9), and removed 3 major releases later (MDEV-29694). Apart from MDEV-30009 and other data corruption bugs covered in my FOSDEM 2023 talk, we have at least MDEV-30134 that I will have to analyze and fix.

            marko Marko Mäkelä added a comment - - edited mdcallag , there are 7 major versions of MariaDB Server (10.5 through 10.11) where not much has been changed with regard to the change buffer. It was disabled by default in MDEV-27734 (10.5), deprecated in MDEV-27735 (10.9), and removed 3 major releases later ( MDEV-29694 ). Apart from MDEV-30009 and other data corruption bugs covered in my FOSDEM 2023 talk , we have at least MDEV-30134 that I will have to analyze and fix.

            My workload (3 secondary indexes, uniform random access, database about 8X larger than memory) is closer to a worst case for showing how bad things can get without the change buffer. Your workload (1 secondary index, database not much larger than memory) is closer to a best case. If your workload cached all, or most, secondary index leaf pages then you will obviously not see a benefit from the change buffer.

            mdcallag Mark Callaghan added a comment - My workload (3 secondary indexes, uniform random access, database about 8X larger than memory) is closer to a worst case for showing how bad things can get without the change buffer. Your workload (1 secondary index, database not much larger than memory) is closer to a best case. If your workload cached all, or most, secondary index leaf pages then you will obviously not see a benefit from the change buffer.
            mihaQ MikaH added a comment -

            Thank you Mark Callaghan for sharing your experiences related to innodb change buffering. I am playing with dataset sizes 4-8x more than available RAM. We stay on SW-level 10.5.6 until MariaDB & Codership is able to publish newer software (including wsrep) that can beat the performance and stability of the 10.5.6, and we have verified it on our own performance and stability tests. I will share our results but it takes time.

            mihaQ MikaH added a comment - Thank you Mark Callaghan for sharing your experiences related to innodb change buffering. I am playing with dataset sizes 4-8x more than available RAM. We stay on SW-level 10.5.6 until MariaDB & Codership is able to publish newer software (including wsrep) that can beat the performance and stability of the 10.5.6, and we have verified it on our own performance and stability tests. I will share our results but it takes time.

            mihaQ, I assume that you experienced performance regressions related to some page flushing changes in MariaDB 10.5.7. They should be mostly addressed in later releases of the 10.5 series. In the 10.6 series, as you can read in MDEV-30628, there is a regression that I am currently working on. Preliminary results related to MDEV-26055 and MDEV-26827 are very promising. Once that is tackled, I will move on to MDEV-29401.

            marko Marko Mäkelä added a comment - mihaQ , I assume that you experienced performance regressions related to some page flushing changes in MariaDB 10.5.7. They should be mostly addressed in later releases of the 10.5 series. In the 10.6 series, as you can read in MDEV-30628 , there is a regression that I am currently working on. Preliminary results related to MDEV-26055 and MDEV-26827 are very promising. Once that is tackled, I will move on to MDEV-29401 .

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              9 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.