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

Server hangs for a long time with innodb_undo_log_truncate=ON

    XMLWordPrintable

Details

    Description

      After implementing MDEV-32757, we are seeing a performance anomaly with innodb_undo_log_truncate=ON. The server is not actually hung or deadlocked (it will eventually recover), but buf_pool.mutex is being occupied for an extremely long time (several minutes).

      1. trx_purge_truncate_history() writes the message InnoDB: Truncating and is about to truncate an undo log tablespace.
      2. trx_purge_truncate_history() is busy-looping in a scan of buf_pool.flush_list because one of the pages belonging to the undo tablespace is write-fixed.
      3. During the time trx_purge_truncate_history() releases and re-acquires buf_pool.flush_list_mutex, buf_flush_page_cleaner (which is holding buf_pool.mutex in buf_do_flush_list_batch()) cannot grab it, in this Ubuntu 18.04 version of GNU libc and Linux kernel (4.15.0-112-generic). This could be similar to MDEV-31343 and MDEV-30180, which could only be reproduced in the same particular environment.
      4. Most threads are blocked because the buf_flush_page_cleaner thread is holding buf_pool.mutex.

      There is some indication that buf_flush_list_batch() may be making some progress (writing out some pages), but it would be extremely slow.

      Attachments

        1. 10.6-MDEV-33009-1.png
          39 kB
          Axel Schwenke
        2. 24x5_high_threads.pdf
          104 kB
          Axel Schwenke
        3. MDEV-33009-9682add5cdf.png
          32 kB
          Axel Schwenke
        4. MDEV-33062-3ef0e678b1c.png
          57 kB
          Axel Schwenke

        Issue Links

          Activity

            People

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