mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-14505 - Threads_running becomes scalability bottleneck
Instead of updating global counter, calculate Threads_running on the fly. All threads having command != COM_SLEEP are included. Behaviour changes: Previously SHOW STATUS and SHOW GLOBAL STATUS returned the same values representing global status. Now SHOW STATUS always returns 1 indicating that current session has 1 thread running. Previously only threads that were executing dispatch_command() or running events were accounted by Threads_running. Now it is rough equivalent of SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE state!='Sleep'
This commit is contained in:
@ -828,6 +828,7 @@ typedef struct system_status_var
|
||||
ulonglong table_open_cache_overflows;
|
||||
double last_query_cost;
|
||||
double cpu_time, busy_time;
|
||||
uint32_t threads_running;
|
||||
/* Don't initialize */
|
||||
/* Memory used for thread local storage */
|
||||
int64 max_local_memory_used;
|
||||
|
Reference in New Issue
Block a user