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

Some calls to buf_read_ahead_linear() seem to be useless

    XMLWordPrintable

Details

    Description

      InnoDB linear read-ahead (which is enabled when innodb_read_ahead_threshold is nonzero) is being invoked in the low-level function buf_page_get_low(). This does not seem useful for page accesses that are likely to be one-time-only, with no anticipation of accessing nearby pages in the near future.

      We should not attempt to invoke read-ahead on index pages that are not at the leaf level.

      We should not invoke linear read-ahead in functions that would essentially allocate or free pages, because allocated pages should be reinitialized by buf_page_create(), eliminating the need to read anything from the file system. Likewise, freeing pages should not involve accessing any sibling pages, except for freeing singly-linked lists of BLOB pages.

      We should not invoke read-ahead in btr_cur_t::pessimistic_search_leaf() or in a pessimistic operation of btr_cur_t::open_leaf(), because pessimistic operations should be preceded by optimistic operations, which should already have invoked read-ahead.

      By doing all this, we will hopefully improve performance in I/O bound workloads.

      Attachments

        Issue Links

          Activity

            People

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