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

Skip check to invoke purge if the transaction is read-only

    XMLWordPrintable

Details

    Description

      On completion of trx_commit, the purge thread is signaled.
      Check for invoking purge (till 10.5) is based on trx_sys.rseg_history_len.
      This check was lately improved (in 10.6 with MDEV-25062) to use rseg->history_size.

      For read-only workload there is no increase in history size this means on each
      commit there is significant overhead to scan all 128 rollback segments to find out
      there is no work to do.

      0.91%          1211  mysqld   mariadbd             [.] trx_sys_t::history_exists

      It is advisable to skip the purge check completely if the transaction is read-only.
      If the system has a parallel running read-write transaction it would cause the purge
      thread to invoke whenever it commits ensuring no loss in functionality.

      -----------

      Patch developed accordingly has shown a 2-3% improvement for the read-only workload.
      (will also submit the patch)

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              krunalbauskar Krunal Bauskar
              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.