You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "José Armando García Sancio (Jira)" <ji...@apache.org> on 2025/10/16 14:52:00 UTC
[jira] [Updated] (KAFKA-19606) Anomaly of JMX metrics RequestHandlerAvgIdlePercent in kraft combined mode
[ https://issues.apache.org/jira/browse/KAFKA-19606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
José Armando García Sancio updated KAFKA-19606:
-----------------------------------------------
Fix Version/s: 4.2.0
> Anomaly of JMX metrics RequestHandlerAvgIdlePercent in kraft combined mode
> --------------------------------------------------------------------------
>
> Key: KAFKA-19606
> URL: https://issues.apache.org/jira/browse/KAFKA-19606
> Project: Kafka
> Issue Type: Bug
> Components: core
> Reporter: tony tang
> Assignee: tony tang
> Priority: Major
> Fix For: 4.2.0
>
> Attachments: Screenshot 2025-08-14 at 12.41.42.png
>
>
> JMX metrics RequestHandlerAvgIdlePercent reports a value close to 2 in combined kraft mode but it's expected to be b/w 0 and 1.
> This is an issue with combined mode specifically because both controller + broker are using the same Meter object in combined mode, defined in {{{}RequestThreadIdleMeter#requestThreadIdleMeter{}}}, but the controller and broker are using separate {{KafkaRequestHandlerPool}} objects, where each object's {{{}threadPoolSize == KafkaConfig.numIoThreads{}}}. This means when calculating idle time, each pool divides by its own {{numIoThreads}} value before reporting to the shared meter and {{RequestHandlerAvgIdlePercent}} calculates the final result by accumulating all the values reported by all threads. However, since there are actually 2 × numIoThreads total threads contributing to the metric, the denominator should be doubled to get the correct average.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)