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

Reduce scalability bottlenecks in mtr_t::commit()

Details

    Description

      MDEV-14425 improved write performance less than it was hoped. We are still seeing log_sys.mutex and buf_pool.mutex dominating the wait times.

      A prominent bottleneck was identified to be log_sys.mutex between log_sys.append_prepare() and log_close(). To protect the copying of data to log_sys.buf, we only need a shared log_sys.latch, which can replace log_sys.mutex and log_sys.flush_order_mutex. The log_sys.lsn and the position of log_sys.buf needs to be protected by a new log_sys.lsn_lock. Writes of log_sys.buf to the file system will have to acquire exclusive log_sys.latch.

      While working on this code, we can also make mtr_t::commit() invoke buf_pool.page_cleaner_wakeup() and update Innodb_buffer_pool_write_requests at most once per call.

      Attachments

        Issue Links

          Activity

            Thanks to wlad for the idea, and for further optimization suggestions.

            marko Marko Mäkelä added a comment - Thanks to wlad for the idea, and for further optimization suggestions.

            greenman, please note that with this change, the minimum value of innodb_log_file_size will increase from 1M to 4M. That was done in order to remove a very unlikely startup error condition, as well as a very unlikely error message output from log_sys.append().

            marko Marko Mäkelä added a comment - greenman , please note that with this change, the minimum value of innodb_log_file_size will increase from 1M to 4M. That was done in order to remove a very unlikely startup error condition, as well as a very unlikely error message output from log_sys.append() .
            greenman Ian Gilfillan added a comment -

            Thanks, updated

            greenman Ian Gilfillan added a comment - Thanks, updated

            People

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