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

Add stall-related status variables to thread pool

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Do
    • N/A
    • Variables
    • None

    Description

      It might make sense to add some stall-related status variables to the Unix implementation of the thread pool.

      Maybe like:

      • Threadpool_stalled_thread_groups

      This could get incremented if the timer thread detects a stall. Around here:

      https://github.com/MariaDB/server/blob/3503fbbebf90cb0fe63993a66dad9bf97fb74c0a/sql/threadpool_generic.cc#L735

      • Threadpool_throttled_thread_creations

      This could get incremented if the timer thread does not create a new worker thread when a stall is detected because the thread group was still within the throttling interval. Around here:

      https://github.com/MariaDB/server/blob/3503fbbebf90cb0fe63993a66dad9bf97fb74c0a/sql/threadpool_generic.cc#L1025

      • Threadpool_oversubscribed_thread_groups

      This could get incremented every time a thread has to go to sleep because the thread group already has thread_pool_oversubscribe active threads. Around here:

      https://github.com/MariaDB/server/blob/3503fbbebf90cb0fe63993a66dad9bf97fb74c0a/sql/threadpool_generic.cc#L1218

      Attachments

        Issue Links

          Activity

            Throttles, or thread creations, or wakeups, do not always happen because of stall.
            There are 3 reasons for wakeups or thread creations -

            • "wait" (thd_wait_begin). This notification helps to keep the number of active threads in the group > 0 (usually 1)
            • "stall" detected by timer thread. This helps to reduce queue time of queries, if one query takes "long time".
            • the need to processed queued events if no thread in the group is currently active. This is detected by listener thread
            wlad Vladislav Vaintroub added a comment - Throttles, or thread creations, or wakeups, do not always happen because of stall. There are 3 reasons for wakeups or thread creations - "wait" (thd_wait_begin). This notification helps to keep the number of active threads in the group > 0 (usually 1) "stall" detected by timer thread. This helps to reduce queue time of queries, if one query takes "long time". the need to processed queued events if no thread in the group is currently active. This is detected by listener thread

            GeoffMontee , can we maybe close it in favor of more solid MDEV-19313 ?

            wlad Vladislav Vaintroub added a comment - GeoffMontee , can we maybe close it in favor of more solid MDEV-19313 ?

            Sure, the idea in MDEV-19313 sounds great.

            GeoffMontee Geoff Montee (Inactive) added a comment - Sure, the idea in MDEV-19313 sounds great.

            People

              wlad Vladislav Vaintroub
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.