junegunn commented on code in PR #7076:
URL: https://github.com/apache/hbase/pull/7076#discussion_r2227042863
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HeapMemoryManager.java:
##########
@@ -363,14 +371,15 @@ private void tune() {
+ blockCachePercentMaxRange + ". Resetting blockCacheSize to min
size");
blockCacheSize = blockCachePercentMaxRange;
}
- int gml = (int) (memstoreSize * CONVERT_TO_PERCENTAGE);
- int bcul = (int) ((blockCacheSize) * CONVERT_TO_PERCENTAGE);
- if (CONVERT_TO_PERCENTAGE - (gml + bcul) <
CLUSTER_MINIMUM_MEMORY_THRESHOLD) {
+
+ if (isHeapMemoryUsageExceedingLimit(memstoreSize, blockCacheSize)) {
LOG.info("Current heap configuration from HeapMemoryTuner exceeds "
- + "the threshold required for successful cluster operation. "
- + "The combined value cannot exceed 0.8. " +
MemorySizeUtil.MEMSTORE_SIZE_KEY + " is "
- + memstoreSize + " and " + HFILE_BLOCK_CACHE_SIZE_KEY + " is " +
blockCacheSize);
- // TODO can adjust the value so as not exceed 80%. Is that correct?
may be.
+ + "the allowed heap usage. At least " + minFreeHeapFraction
+ + " of the heap must remain free to ensure stable RegionServer
operation. "
+ + MemorySizeUtil.MEMSTORE_SIZE_KEY + " is " + memstoreSize + " and
"
+ + HFILE_BLOCK_CACHE_SIZE_KEY + " is " + blockCacheSize);
+ // NOTE: In the future, we might adjust values to not exceed limits,
+ // but for now tuning is skipped if over threshold.
Review Comment:
Keeping the existing comment as-is, no need to change it in this scope.
--
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]