rseetham commented on code in PR #18419:
URL: https://github.com/apache/pinot/pull/18419#discussion_r3191692150


##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/ResourceUsageUtils.java:
##########
@@ -40,4 +42,21 @@ public static long getMaxHeapSize() {
   public static long getUsedHeapSize() {
     return MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed();
   }
+
+  /**
+   * Returns heap bytes used immediately after the last GC, summed across all 
memory pools.
+   * More stable than {@link #getUsedHeapSize()} because it excludes 
short-lived objects allocated

Review Comment:
   You're right — looking at our existing metrics we already have 
g1_old_gen.used_after_gc, g1_survivor_space.used_after_gc, and full GC 
timing/count metrics for young, old, and concurrent generations. This new 
metric adds no signal that can't be derived by summing the existing pool 
metrics at the query layer. I'll remove it.
   
   This metric will provide the summed value regardless of which gc we use. So 
if we were using zgc, we'll need to update our metric. So this is a nice to 
have only



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to