Skip to content

Commit 1fe8cba

Browse files
Check memory load
1 parent 0d700d7 commit 1fe8cba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/WriteThreadPoolSizeManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ public void adjustThreadPoolSizeBasedOnCPU(double cpuUtilization) throws Interru
429429
* @return the adjusted (reduced) pool size based on CPU and memory conditions.
430430
*/
431431
private int calculateReducedPoolSizeHighCPU(int currentPoolSize, double memoryLoad) {
432+
LOG.debug("The high cpu memory load is {}", memoryLoad);
432433
if (memoryLoad > highMemoryThreshold) {
433434
LOG.debug("High CPU & high memory load ({}). Aggressive reduction: current={}, new={}",
434435
memoryLoad, currentPoolSize, currentPoolSize / HIGH_CPU_LOW_MEMORY_REDUCTION_FACTOR);
@@ -451,6 +452,7 @@ private int calculateReducedPoolSizeHighCPU(int currentPoolSize, double memoryLo
451452
* @return the adjusted (reduced) pool size based on medium CPU and memory conditions.
452453
*/
453454
private int calculateReducedPoolSizeMediumCPU(int currentPoolSize, double memoryLoad) {
455+
LOG.debug("The medium cpu memory load is {}", memoryLoad);
454456
if (memoryLoad > highMemoryThreshold) {
455457
int reduced = Math.max(initialPoolSize, currentPoolSize - currentPoolSize / MEDIUM_CPU_LOW_MEMORY_REDUCTION_FACTOR);
456458
LOG.debug("Medium CPU & high memory load ({}). Reducing: current={}, new={}",
@@ -473,6 +475,7 @@ private int calculateReducedPoolSizeMediumCPU(int currentPoolSize, double memory
473475
* @return the adjusted (increased or decreased) pool size based on CPU and memory conditions.
474476
*/
475477
private int calculateIncreasedPoolSizeLowCPU(int currentPoolSize, double memoryLoad) {
478+
LOG.debug("The low cpu memory load is {}", memoryLoad);
476479
if (memoryLoad <= lowMemoryThreshold) {
477480
int increased = Math.min(maxThreadPoolSize, (int) (currentPoolSize * LOW_CPU_POOL_SIZE_INCREASE_FACTOR));
478481
LOG.debug("Low CPU & low memory load ({}). Increasing: current={}, new={}",

0 commit comments

Comments
 (0)