Class MemoryScaling


  • public class MemoryScaling
    extends java.lang.Object
    Memory scaling ensures that memory is scaled alongside with the number of available TaskManagers.

    When scaling down, TaskManagers are removed which can drastically limit the amount of available memory. To mitigate this issue, we keep the total cluster memory constant, until we can measure the actual needed memory usage.

    When scaling up, i.e. adding more TaskManagers, we don't remove memory to ensure that we do not run into memory-constrained scenarios. However, MemoryTuning will still be applied which can result in a lower TaskManager memory baseline.

    • Constructor Summary

      Constructors 
      Constructor Description
      MemoryScaling()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.flink.configuration.MemorySize applyMemoryScaling​(org.apache.flink.configuration.MemorySize currentMemorySize, MemoryBudget memoryBudget, JobAutoScalerContext<?> context, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,​ScalingSummary> scalingSummaries, EvaluatedMetrics evaluatedMetrics)
      Scales the amount of memory per TaskManager proportionally to the number of TaskManagers removed/added.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MemoryScaling

        public MemoryScaling()
    • Method Detail

      • applyMemoryScaling

        public static org.apache.flink.configuration.MemorySize applyMemoryScaling​(org.apache.flink.configuration.MemorySize currentMemorySize,
                                                                                   MemoryBudget memoryBudget,
                                                                                   JobAutoScalerContext<?> context,
                                                                                   java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,​ScalingSummary> scalingSummaries,
                                                                                   EvaluatedMetrics evaluatedMetrics)
        Scales the amount of memory per TaskManager proportionally to the number of TaskManagers removed/added.