[MXS-1669] maxadmin "show threads" counters are probably incorrect Created: 2018-02-14  Updated: 2020-08-25  Resolved: 2018-02-15

Status: Closed
Project: MariaDB MaxScale
Component/s: maxadmin
Affects Version/s: 2.1.10
Fix Version/s: 2.1.14

Type: Bug Priority: Major
Reporter: Valerii Kravchuk Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: maxadmin, regression


 Description   

One may get the output like this from show threads command in maxadmin:

Polling Threads.
 
Historic Thread Load Average: -2.46.
Current Thread Load Average: 1.00.
15 Minute Average: 1.00, 5 Minute Average: 1.00, 1 Minute Average: 1.00
 
Pending event queue length averages:
15 Minute Average: 0.00, 5 Minute Average: 0.00, 1 Minute Average: 0.00
 
 ID | State      | # fds  | Descriptor       | Running  | Event
----+------------+--------+------------------+----------+---------------
  0 | Processing |      1 | 0x7fed5004b600   | <3017963900ms | IN|OUT
  1 | Polling    |        |                  |          |
  2 | Polling    |        |                  |          |

Note negative "Historic Thread Load Average" and huge value in Running column: "<3017963900ms"

MaxScale instance itself is from testing environment and is not under any high load. From ps aux we see:

maxscale 39282  1.3  0.7 438192 29296 ?        Ssl  Jan10 660:22 /usr/bin/maxscale

With 2.0.x this kind of values were not noted.



 Comments   
Comment by Johan Wikman [ 2018-02-15 ]

I'm not altogether sure whether the load average numbers actually were meaningful in 2.0. In 2.1 they certainly are not as the threading architecture was significantly changed and the load calculation was not updated accordingly (partly because it was not obvious how to do it). The load average output should have been removed. In 2.2 that has been done.

Comment by markus makela [ 2018-02-15 ]

The negative Historic Thread Load Average could be explained by signed 32-bit integer overflow.

The excessive Running value is caused by a change in the threading model that causes of some of the variables in the DCBs to not be updated. The correct value to use is the DCB's last_read value (last point in time that network activity happened on the DCB).

Generated at Thu Feb 08 04:08:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.