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

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

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

            krunalbauskar Krunal Bauskar created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ]
            Labels performance purge
            marko Marko Mäkelä made changes -
            Issue Type Task [ 3 ] Bug [ 1 ]
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Fix Version/s 10.6 [ 24028 ]
            Affects Version/s 10.6.3 [ 25904 ]
            Priority Minor [ 4 ] Major [ 3 ]
            marko Marko Mäkelä made changes -
            krunalbauskar Krunal Bauskar made changes -
            Attachment mdev-26193.original.patch [ 58328 ]
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2021-07-22 07:49:48.0 2021-07-22 07:49:48.359
            marko Marko Mäkelä made changes -
            Fix Version/s 10.6.4 [ 26033 ]
            Fix Version/s 10.6 [ 24028 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            marko Marko Mäkelä made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 123608 ] MariaDB v4 [ 159528 ]

            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.