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

InnoDB read-write workload hits contention arising from rollback segment mutex

    XMLWordPrintable

    Details

      Description

      • Each read-write transaction uses a rollback segment to store undo-records (needed for rollback).
      • Currently, InnoDB has 128 rollback segments (max) and they are shared by all the threads.
      • This means if a user is running 1024 threads workload, 8 threads will use the same rollback segment. Given each thread is running a transaction at a given point in time.
      • Put this on numa scale and the factor gets multiplied by numa scalability bottleneck that means the same rseg needs to be accessed by multiple threads located (possibly) across numa.
      • All this makes rseg-mutex one of the hottest mutex.

      Testing carried out using sysbench-update-index with 1024 threads on a machine with 4 numa (2 sockets). 10.6 branch #80ac9ec1).

      EVENT_NAME WAIT_MS COUNT_STAR
      wait/synch/mutex/innodb/redo_rseg_mutex 102697560.5683 58758773
      wait/synch/mutex/innodb/log_sys_mutex 49862366.5623 73277659
      wait/synch/mutex/innodb/dict_sys_mutex 21348825.2544 71961431
      wait/synch/mutex/innodb/redo_rseg_mutex 0.0905 2058

      <70 secs of update-index workload with 1024 threads>

      wait/synch/mutex/innodb/redo_rseg_mutex 21298612.2935 17804286

      <70 secs of update-index workload with 1024 threads>

      wait/synch/mutex/innodb/redo_rseg_mutex 61677736.5123 37997346

      <70 secs of update-index workload with 1024 threads>

      wait/synch/mutex/innodb/redo_rseg_mutex 102884379.5462 58871725

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              krunalbauskar Krunal Bauskar
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration