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

Replace trx_sys_t::rw_trx_set with LF_HASH

Details

    Description

      trx_sys_t::rw_trx_set implemented as std::set, which does a few quite expensive operations under trx_sys_t::mutex protection. E.g. malloc/free when adding/removing elements.

      Aim of this task is to reduce trx_sys_t::mutex contention by replacing rw_trx_set with LF_HASH.

      Attachments

        Issue Links

          Activity

            svoj Sergey Vojtovich added a comment - marko , please review top 3 patches here: https://github.com/MariaDB/server/commits/bb-10.3-MDEV14638

            4 patches now: optimised one of find() calls.

            Remaining find() calls worth optimising:

            storage/innobase/lock/lock0lock.cc:             trx = trx_sys->rw_trx_hash.find(trx_id, true);
            storage/innobase/row/row0vers.cc:       trx_t*  trx = trx_sys->rw_trx_hash.find(trx_id, true);
            storage/innobase/row/row0vers.cc:               version_trx = trx_sys->rw_trx_hash.find(version_trx_id);
            storage/innobase/btr/btr0cur.cc:            && !trx_sys->rw_trx_hash.find(row_get_rec_trx_id(rec, index,
            

            svoj Sergey Vojtovich added a comment - 4 patches now: optimised one of find() calls. Remaining find() calls worth optimising: storage/innobase/lock/lock0lock.cc: trx = trx_sys->rw_trx_hash.find(trx_id, true); storage/innobase/row/row0vers.cc: trx_t* trx = trx_sys->rw_trx_hash.find(trx_id, true); storage/innobase/row/row0vers.cc: version_trx = trx_sys->rw_trx_hash.find(version_trx_id); storage/innobase/btr/btr0cur.cc: && !trx_sys->rw_trx_hash.find(row_get_rec_trx_id(rec, index,

            danblack, you might be interested in this cool thing as well.

            svoj Sergey Vojtovich added a comment - danblack , you might be interested in this cool thing as well.
            danblack Daniel Black added a comment -

            Ooh, shiny, thanks svoj, I'll take a look.

            danblack Daniel Black added a comment - Ooh, shiny, thanks svoj , I'll take a look.

            I saved tree with Marko's commits to https://github.com/MariaDB/server/commits/bb-10.3-MDEV14638-1
            Also I integrated some of suggestions and did force push to https://github.com/MariaDB/server/commits/bb-10.3-MDEV14638

            svoj Sergey Vojtovich added a comment - I saved tree with Marko's commits to https://github.com/MariaDB/server/commits/bb-10.3-MDEV14638-1 Also I integrated some of suggestions and did force push to https://github.com/MariaDB/server/commits/bb-10.3-MDEV14638

            Very good. Please address my review comments 1, 2 and submit revised commits for final approval.

            marko Marko Mäkelä added a comment - Very good. Please address my review comments 1 , 2 and submit revised commits for final approval.

            OK to push with the fix-up, after addressing my remaining minor comments.

            marko Marko Mäkelä added a comment - OK to push with the fix-up , after addressing my remaining minor comments.

            People

              svoj Sergey Vojtovich
              svoj Sergey Vojtovich
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.