[ https://issues.apache.org/jira/browse/FLINK-39956 ]
Swati Gupta deleted comment on FLINK-39956:
-------------------------------------
was (Author: JIRAUSER311913):
Thanks for filing this, the per-pool CollectionUsage gauges would be useful for
heap-sizing analysis. A few clarifying questions before picking this up:
1. When you say this should mirror the existing per-collector GC metric
pattern, do you mean reusing the same metric group structure/naming convention,
or just a conceptually similar approach?
2. Should `Init` and `Committed` also be exposed for each pool, or strictly
limited to `Used`/`Max`/`CollectionUsed` as described?
3. Some memory pools return `null` from `getCollectionUsage()` (pools that
don't support GC usage tracking). Should those pools be skipped entirely, or
should the gauge report 0/absent in that case?
4. Is there an expected naming convention for the pool names in the metric
path? JVM pool names like "G1 Eden Space" contain spaces, which may need
sanitizing to match Flink's metric naming conventions.
Happy to pick this up once these are clarified.
> Expose per-pool heap CollectionUsage gauges
> -------------------------------------------
>
> Key: FLINK-39956
> URL: https://issues.apache.org/jira/browse/FLINK-39956
> Project: Flink
> Issue Type: Improvement
> Components: Runtime / Metrics
> Affects Versions: 2.2.0, 2.1.3
> Reporter: Zhenqiu Huang
> Priority: Minor
>
> Adds Used/Max/CollectionUsed/CollectionMax gauges for each heap memory
> pool under the new 'Pool' metric group, mirroring the per-collector
> breakdown already provided for GarbageCollector metrics. Metaspace is
> NON_HEAP and remains covered by instantiateMetaspaceMemoryMetrics.
> CollectionUsed (MemoryPoolMXBean.getCollectionUsage().getUsed()) is the
> post-GC retained set per pool, which heap-sizing analyses need to
> distinguish live data from short-lived garbage. Without these gauges,
> only the top-level HeapMemoryUsage.used is exposed, which is dominated
> by Eden allocation and cannot be used to size old-generation capacity.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)