Details
-
Bug
-
Status: In Testing (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.4.1, 10.11.10, 11.4.5, 10.11.12, 10.11.13, 10.11.14
-
None
-
Almalinux 8, Debian 11
Description
Hello,
We are using the userstat plugin to track users mysql cpu minutes. Since upgrading from MariaDB 10.6 to 10.11, we noticed increased CPU_TIME in the information_schema.user_statistics table. The CPU_TIME column reads as much as 10 times higher than BUSY_TIME.
In versions 10.6 and below, BUSY_TIME always used to be slighly higher than CPU_TIME, which I think is the expected behaviour:
"Busy_time
Description: Cumulative time in seconds of activity on connections. Part of User Statistics. Requires the userstat system variable to be set in order to be recorded.
Scope: Global
Data Type: numeric
Description: Total CPU time used. Part of User Statistics. Requires the userstat system variable to be set in order to be recorded.
Scope: Global, Session
Data Type: numeric
I have confirmed this on multiple environments and setups, including Almalinux 8 and Debian 11. The results are always the same, regardless of the configuration in use. I'm using this simple query to test:
MariaDB [(none)]> SELECT BENCHMARK(50000000, MD5('cpu_test'));
|
+--------------------------------------+
|
| BENCHMARK(50000000, MD5('cpu_test')) |
|
+--------------------------------------+
|
| 0 |
|
+--------------------------------------+
|
1 row in set (11.693 sec)
|
In the example above, the query finished for 11.693 seconds. However, the recorded CPU_TIME for this query is 116.220914, while BUSY_TIME is 11.693639.
I couldn't find anything related in the changelog, nor in the documentation.