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

Status threads_running show wrong value since 10.3

    XMLWordPrintable

    Details

      Description

      SHOW GLOBAL STATUS LIKE 'threads_running' was a good indicator for the current running workload in a database.

      Sine MariaDB 10.3 it is showing higher values than before (MariaDB 10.2 and lower and competitive products).

      10.2.14-MariaDB-log MariaDB Server

      SELECT id, user, command, state FROM information_schema.processlist;
      +----+-------------+-------------+------------------------------------------------------------------+
      | id | user        | command     | state                                                            |
      +----+-------------+-------------+------------------------------------------------------------------+
      | 21 | root        | Query       | Filling schema table                                             |
      | 10 | replication | Binlog Dump | Master has sent all binlog to slave; waiting for binlog to be up |
      |  5 | system user | Daemon      | InnoDB shutdown handler                                          |
      |  4 | system user | Daemon      | InnoDB purge worker                                              |
      |  2 | system user | Daemon      | InnoDB purge worker                                              |
      |  1 | system user | Daemon      | InnoDB purge worker                                              |
      |  3 | system user | Daemon      | InnoDB purge coordinator                                         |
      +----+-------------+-------------+------------------------------------------------------------------+
      7 rows in set (0.00 sec)
      

      SHOW GLOBAL STATUS LIKE 'threads_running';
      +-----------------+-------+
      | Variable_name   | Value |
      +-----------------+-------+
      | Threads_running | 2     |
      +-----------------+-------+
      

      10.3.12-MariaDB-log MariaDB Server

      SELECT id, user, command, state FROM information_schema.processlist;
      +----+-------------+---------+--------------------------+
      | id | user        | command | state                    |
      +----+-------------+---------+--------------------------+
      | 10 | root        | Query   | Filling schema table     |
      |  5 | system user | Daemon  | InnoDB shutdown handler  |
      |  2 | system user | Daemon  | InnoDB purge coordinator |
      |  4 | system user | Daemon  | InnoDB purge worker      |
      |  3 | system user | Daemon  | InnoDB purge worker      |
      |  1 | system user | Daemon  | InnoDB purge worker      |
      +----+-------------+---------+--------------------------+
      6 rows in set (0.001 sec)
      

      SHOW GLOBAL STATUS LIKE 'threads_running';
      +-----------------+-------+
      | Variable_name   | Value |
      +-----------------+-------+
      | Threads_running | 6     |
      +-----------------+-------+
      

      It seems like now it is showing all Threads from Processlist including Daemon threads. This was not the case before. The Daemon threads are currently not doing anything on my system so they should not be counted in.

      Impact: This could influence/confuse all monitoring solutions for MariaDB and will show a virtual higher workload compared to previous versions (bad image) and pseudo-require more CPU resource allocation for newer releases.

      Possibly was introduced with this fix: https://jira.mariadb.org/browse/MDEV-14505

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              svoj Sergey Vojtovich
              Reporter:
              oli Oli Sennhauser
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: