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

Segmented key cache for Aria

    XMLWordPrintable

Details

    Description

      MyISAM has a segmented key cache to improve performance when multiple users are running queries concurrently.
      We should do the same for Aria. This is important, because it affects internal aria temp tables.

      We could do this in two phases:

      • First do a version when one cannot change the number of segments or change the size of the key caches. This makes the initial version much easier to implement. Then later, if needed, add the functionality to change the above things.

      Some implementation details:

      • Add a new option, aria-pagecache-segments, default 1.
      • Create the number of requested key caches at aria startup, each of the size of aria.pagecache-buffer-size/aria-pagecache-segment
      • Use the file number info->dfile, and info->s->kfile to decide which pagecache to use. The pagecache used could potentially be stored in PAGECACHE_FILE for fast usage. This will require some changes in storage/maria/ma_pagecaches.c (this file is not yet used).
      • This greatly simplifies flushing of a file as we have only to loop over one pagecache.
      • Change code that calls pagecache_end, pagecache_init etc to loop over all pagecaches.
      • Change code in ma_checkpoint.c to loop over all pagecaches.

      Attachments

        1. gcov-mtr-mdev-24-0b908ede.txt
          75 kB
        2. oltp-rw.png
          oltp-rw.png
          5 kB
        3. oltp-rw-32.png
          oltp-rw-32.png
          5 kB
        4. point-select.png
          point-select.png
          5 kB
        5. tmp_table_OLTP_bars.png
          tmp_table_OLTP_bars.png
          9 kB

        Issue Links

          Activity

            People

              monty Michael Widenius
              ratzpo Rasmus Johansson (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              12 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.