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

MariaDB does unexpected storage read IO for the redo log

    XMLWordPrintable

Details

    Description

      The full writeup is here. The summary is that while running sysbench with a cached database I see reads from storage during some of the write-heavy microbenchmark steps and that IO is being done for the redo log.

      I saw this long ago with web-scale MySQL. The issue is that writing the first 512 bytes to a 4kb filesystem page must read the page into the OS page cache when using buffered IO.

      I don't see this with upstream MySQL 5.7.44 or 8.0.36. While 8.0.36 has innodb_log_write_ahead_size, that isn't required to avoid it because I also don't see this with 5.7.44.

      I know that MariaDB has changed the InnoDB redo log architecture somewhere between MariaDB 10.4 and 11.4 because it now uses only one large redo log file while MySQL uses many (configurable number) smaller ones. But I have yet to figure out why this shows up in 10.11 and not in 10.6.

      I used strace to see how the redo log file was opened and the pwrite64 calls. I didn't see any obvious differences between MariaDB and MySQL other than the change (one large redo log) listed above.

      I can avoid this by using a small redo log, but is bad for performance because it increases write back activity.

      Attachments

        Issue Links

          Activity

            People

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