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

InnoDB transactions are not aligned at cache lines

Details

    Description

      When the lock-free hash table trx_sys.rw_trx_hash was implemented in MariaDB Server 10.3 was implemented, the cache line alignment of transaction objects became more important when iterating the hash table. All trx_t are allocated via trx_pools, and it is easy to change that to return cache line aligned objects.

      Furthermore, rw_trx_hash_element_t::mutex is unnecessarily large. Replacing it with the futex (or Microsoft Windows SRWLOCK) based srw_mutex will shrink the size of a hash table element to 64 bytes (the size of a cache line on most AMD64 implementations). There was an internal interface for PERFORMANCE_SCHEMA instrumentation for the element mutexes, but it was not exposed via all_innodb_mutexes.

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2022-04-14 09:47:13.0 2022-04-14 09:47:13.67
            marko Marko Mäkelä made changes -
            Fix Version/s 10.6.8 [ 27506 ]
            Fix Version/s 10.7.4 [ 27504 ]
            Fix Version/s 10.8.3 [ 27502 ]
            Fix Version/s 10.9.1 [ 27114 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Fix Version/s 10.8 [ 26121 ]
            Fix Version/s 10.9 [ 26905 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            rob.schwyzer@mariadb.com Rob Schwyzer (Inactive) made changes -
            rob.schwyzer@mariadb.com Rob Schwyzer (Inactive) made changes -

            People

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