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

Remove multiple InnoDB buffer pool instances

    XMLWordPrintable

Details

    Description

      This came up during the MDEV-15016 review.

      I started to wonder whether multiple InnoDB buffer pools actually help with any workloads. Yes, it probably was a good idea to split the buffer pool mutex when Inaam Rana introduced multiple buffer pools in MySQL 5.5.5, but since then, there have been multiple fixes to reduce contention on the buffer pool mutex, such as Inaam's follow-up fix in MySQL 5.6.2 to use rw-locks instead of mutexes for the buf_pool->page_hash.

      In MySQL 8.0.0, Shaohua Wang implemented one more thing that MariaDB should copy: MDEV-15053 Split buf_pool_t::mutex.

      I think that we should seriously consider removing all code to support multiple buffer pools or page cleaners.
      Should multiple buffer pools be needed in the future (for example, on NUMA machines), it should be designed better from the ground up. Currently the partitioning is arbitrary; buffer pool membership is basically determined by a hash of the page number.

      The description of WL#6642: InnoDB: multiple page_cleaner threads seems to imply that it may have been a mistake to partition the buffer pool.

      Note: partitioning or splitting mutexes often seems to be a good idea. But partitioning data structures or threads might not be.

      axel, please test different workloads with innodb_buffer_pool_instances=1 and innodb_page_cleaners=1, and compare the performance to configurations that use multiple buffer pools (and page cleaners). If using a single buffer pool instance never seems to causes any regression, I think that we should simplify the code.

      Attachments

        1. MDEV-15058.ods
          82 kB
        2. MDEV-15058.pdf
          56 kB
        3. MDEV-15058-B.ods
          77 kB
        4. MDEV-15058-B.pdf
          51 kB
        5. MDEV-15058-thiru.ods
          73 kB
        6. MDEV-15058-thiru.pdf
          53 kB
        7. MDEV-15058-tpcc.ods
          45 kB
        8. MDEV-15058-singleBP.ods
          51 kB
        9. MDEV-15058-RAM-Intel.ods
          82 kB
        10. MDEV-15058-RAM-ARM.ods
          77 kB
        11. MDEV-15058-SSD-ARM.ods
          79 kB
        12. MDEV-15058-SSD-Intel.ods
          80 kB
        13. MDEV-15058-10.4.10.ods
          88 kB
        14. MDEV-15058-10.4vs10.5.ods
          140 kB
        15. MDEV-15058-10.5.ods
          88 kB
        16. MDEV-15058-10.5-dev.ods
          68 kB
        17. MDEV-15058-10.5-34dafb7e3a8.ods
          49 kB
        18. ramdisk-ro1.svg
          428 kB
        19. ramdisk-ro4.svg
          395 kB
        20. ramdisk-rw1.svg
          782 kB
        21. ramdisk-rw4.svg
          581 kB
        22. 4bp.txt
          86 kB
        23. 1bp.txt
          81 kB

        Issue Links

          Activity

            People

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