[#1356] improvement: add metric of total expired pre-allocated buffers - #1412
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1412 +/- ##
============================================
+ Coverage 53.25% 54.15% +0.90%
- Complexity 2715 2721 +6
============================================
Files 418 399 -19
Lines 23918 21629 -2289
Branches 2043 2045 +2
============================================
- Hits 12738 11714 -1024
+ Misses 10395 9199 -1196
+ Partials 785 716 -69 ☔ View full report in Codecov by Sentry. |
|
PTAL @jerqi @zuston |
zuston
left a comment
There was a problem hiding this comment.
I think the expired require buffer id number also could be collected as a metric, this could be involved in this PR. WDYT?
|
|
||
| public static Gauge.Child gaugeIsHealthy; | ||
| public static Gauge.Child gaugeAllocatedBufferSize; | ||
| public static Gauge.Child gaugePreAllocatedBufferSize; |
cb346f2 to
7f9f918
Compare
@zuston |
|
Emm. you misunderstand my thought. I hope the number of expired buffer rather than buffer id list. This number increase could reflect something wrong. |
@zuston Get it and i coded it, PTAL. |
|
|
||
| private static final String IS_HEALTHY = "is_healthy"; | ||
| private static final String ALLOCATED_BUFFER_SIZE = "allocated_buffer_size"; | ||
| private static final String EXPIRED_PRE_ALLOCATED_BUFFER_SIZE = |
There was a problem hiding this comment.
these metrics should be counter rather than gauge. Right ?
And the name should be obey the rule. xxxx_total
| // move release memory code down to here as the requiredBuffer could be consumed during | ||
| // removing processing. | ||
| shuffleBufferManager.releaseMemory(info.getRequireSize(), false, true); | ||
| ShuffleServerMetrics.counterExpiredPreAllocatedBufferSizeTotal.inc(info.getRequireSize()); |
There was a problem hiding this comment.
CounterExpiredPreAllocatedBufferSizeTotal is necessary? I feel A bit repetitive with counterExpiredPreAllocatedBufferIdTotal.
If we're just trying to capture how often timeouts happen, counterExpiredPreAllocatedBufferIdTotal maybe enough. But I'm not sure if you serve any other purpose.
There was a problem hiding this comment.
the total expired buffer size is to diagnose cases where allocated metric is negative. I will compare these value to check what happen of allocated is leaked.
zuston
left a comment
There was a problem hiding this comment.
Overall lgtm. Please solve the rest comment.
|
|
||
| public static Gauge.Child gaugeIsHealthy; | ||
| public static Gauge.Child gaugeAllocatedBufferSize; | ||
| public static Gauge.Child gaugePreAllocatedBufferSize; |
What changes were proposed in this pull request?
Add metrics of expired pre-allocated buffer size
Why are the changes needed?
Fix: #1356
Does this PR introduce any user-facing change?
No.
How was this patch tested?
test on PRD