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

Spurious lock_wait_timeout_thread wakeup in lock_wait_suspend_thread()

Details

    Description

      http://bugs.mysql.com/bug.php?id=72123

      lock_timeout thread works in a tight loop waking up every second
      and checking for lock_wait_timeout. In addition, when a mysql
      thread is forced to wait on a lock, it signals the lock_timeout thread
      as well. This call is not required. In a heavily contended workload
      each thread going to wait will signal the lock_timeout thread making
      it work all the time. As lock_timeout thread scans the array of
      waiting threads under lock_sys::wait_mutex which is already very
      hot in contneded loads, these extra scans can cause significanct
      performance regression.

      Also, in various codepaths lock_timeout thread is signalled where
      actual intention was to signal the innodb monitor thread.

      Attachments

        Issue Links

          Activity

            jplindst Jan Lindström (Inactive) created issue -
            jplindst Jan Lindström (Inactive) made changes -
            Field Original Value New Value
            jplindst Jan Lindström (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            revno: 4455
            committer: Jan Lindström <jplindst@mariadb.org>
            branch nick: 10.0-innodb
            timestamp: Fri 2014-10-24 17:56:04 +0300
            message:
            MDEV-6933: Spurious lock_wait_timeout_thread wakeup in lock_wait_suspend_thread()

            Merged Facebooks commit 6e06bbfa315ffb97d713dd6e672d6054036ddc21
            authored by Inaam Rana from https://github.com/facebook/mysql-5.6.

            Fixes MySQL bug http://bugs.mysql.com/bug.php?id=72123

            lock_timeout thread works in a tight loop waking up every second
            and checking for lock_wait_timeout. In addition, when a mysql
            thread is forced to wait on a lock, it signals the lock_timeout thread
            as well. This call is not required. In a heavily contended workload
            each thread going to wait will signal the lock_timeout thread making
            it work all the time. As lock_timeout thread scans the array of
            waiting threads under lock_sys::wait_mutex which is already very
            hot in contneded loads, these extra scans can cause significanct
            performance regression.

            Also, in various codepaths lock_timeout thread is signalled where
            actual intention was to signal the innodb monitor thread.

            jplindst Jan Lindström (Inactive) added a comment - revno: 4455 committer: Jan Lindström <jplindst@mariadb.org> branch nick: 10.0-innodb timestamp: Fri 2014-10-24 17:56:04 +0300 message: MDEV-6933 : Spurious lock_wait_timeout_thread wakeup in lock_wait_suspend_thread() Merged Facebooks commit 6e06bbfa315ffb97d713dd6e672d6054036ddc21 authored by Inaam Rana from https://github.com/facebook/mysql-5.6 . Fixes MySQL bug http://bugs.mysql.com/bug.php?id=72123 lock_timeout thread works in a tight loop waking up every second and checking for lock_wait_timeout. In addition, when a mysql thread is forced to wait on a lock, it signals the lock_timeout thread as well. This call is not required. In a heavily contended workload each thread going to wait will signal the lock_timeout thread making it work all the time. As lock_timeout thread scans the array of waiting threads under lock_sys::wait_mutex which is already very hot in contneded loads, these extra scans can cause significanct performance regression. Also, in various codepaths lock_timeout thread is signalled where actual intention was to signal the innodb monitor thread.
            jplindst Jan Lindström (Inactive) made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Workflow MariaDB v2 [ 56308 ] MariaDB v3 [ 64999 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 64999 ] MariaDB v4 [ 148343 ]

            People

              jplindst Jan Lindström (Inactive)
              jplindst Jan Lindström (Inactive)
              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.