You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Chia-Ping Tsai (Jira)" <ji...@apache.org> on 2025/01/27 18:38:00 UTC
[jira] [Resolved] (KAFKA-18597) max-buffer-utilization-percent is always 0
[ https://issues.apache.org/jira/browse/KAFKA-18597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chia-Ping Tsai resolved KAFKA-18597.
------------------------------------
Resolution: Fixed
3.9: [https://github.com/apache/kafka/commit/85658e5e33f550c6953ae58e37cc1808fd56b879]
3.8: https://github.com/apache/kafka/commit/5ea660bf940a3d26cbcad414c2e523871543b94d
> max-buffer-utilization-percent is always 0
> ------------------------------------------
>
> Key: KAFKA-18597
> URL: https://issues.apache.org/jira/browse/KAFKA-18597
> Project: Kafka
> Issue Type: Bug
> Reporter: Chia-Ping Tsai
> Assignee: Logan Zhu
> Priority: Minor
> Fix For: 4.1.0, 3.9.1, 3.8.2
>
>
> see [https://github.com/apache/kafka/blob/516d5240b98916feb3e51c8a143dede05a4edad1/core/src/main/scala/kafka/log/LogCleaner.scala#L127]
>
> private def maxOverCleanerThreads(f: CleanerThread => Double): Int =
> cleaners.foldLeft(0.0d)((max: Double, thread: CleanerThread) => math.max(max, f(thread))).toInt
> /* a metric to track the maximum utilization of any thread's buffer in the last cleaning */
> metricsGroup.newGauge(MaxBufferUtilizationPercentMetricName,
> () => maxOverCleanerThreads(_.lastStats.bufferUtilization) * 100)
> we always round down the double value, so `maxOverCleanerThreads(_.lastStats.bufferUtilization)` returns 0 always
--
This message was sent by Atlassian Jira
(v8.20.10#820010)