This article explains where Foglight obtains thread-related MySQL metrics such as Threads_running
, Threads_connected
, Threads_cached
, and Thread_cache_size
, and how they are collected by the MySQL cartridge.
Foglight dashboards display metrics related to MySQL thread pool activity, such as:
Users may want to understand where these metrics originate and how they are collected.
Foglight collects these metrics from the MySQL server using SQL queries during each monitoring cycle. These metrics reflect the status and configuration of the MySQL thread pool and are important for understanding concurrency and connection reuse behavior.
The following table summarizes the source of each thread-related metric collected by the MySQL cartridge:
Foglight Metric | MySQL Source | SQL Command |
---|---|---|
Threads Running | Server status variable | SHOW STATUS |
Threads Connected | Server status variable | SHOW STATUS |
Threads Cached | Server status variable | SHOW STATUS |
Threads Created per Second | Derived from Threads_created | SHOW STATUS (differenced over time) |
Thread Cache Size | Configuration variable | SHOW VARIABLES LIKE 'thread_cache_size' |
Thread Pool Hit Rate (%) | Derived from Threads_created and Connections | SHOW STATUS |
SHOW STATUS
returns real-time server status metrics.SHOW VARIABLES
returns configuration values, including thread_cache_size
.Threads_created
between two polling intervals.1 - (Threads_created / Connections)
expressed as a percentage.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center