Class InterestBasedEnumerator
java.lang.Object
org.apache.sysds.resource.enumeration.Enumerator
org.apache.sysds.resource.enumeration.InterestBasedEnumerator
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sysds.resource.enumeration.Enumerator
Enumerator.Builder, Enumerator.EnumerationStrategy, Enumerator.OptimizationStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doublestatic final doublestatic final doublestatic final doublestatic final longstatic final booleandifferent instance families can have slightly different memory characteristics and using memory delta allows not ignoring equivalent instances of different families (e.g.Fields inherited from class org.apache.sysds.resource.enumeration.Enumerator
COST_DELTA_FRACTION, DEFAULT_MAX_EXECUTORS, DEFAULT_MIN_EXECUTORS -
Constructor Summary
ConstructorsConstructorDescriptionInterestBasedEnumerator(Enumerator.Builder builder, boolean interestLargestEstimate, boolean fitDriverMemory, boolean interestBroadcastVars, boolean interestOutputCaching) -
Method Summary
Modifier and TypeMethodDescriptionestimateRangeExecutors(int driverCores, long executorMemory, int executorCores) Estimates the minimum and maximum number of executors based on given VM instance characteristics, the enumeration strategy and the user-defined configurationsbooleanevaluateSingleNodeExecution(long driverMemory, int cores) getMemoryEstimates(Program currentProgram, boolean outputOnly, double memoryFactor) Extracts the memory estimates which original size is larger thanMINIMUM_RELEVANT_MEM_ESTIMATEbooleanbooleanbooleanbooleanvoidCalled once to enumerate the search space for VM instances for driver or executor nodes.Methods inherited from class org.apache.sysds.resource.enumeration.Enumerator
getCostsWeightFactor, getDriverSpace, getEnumStrategy, getExecutorSpace, getInstances, getMaxPrice, getMaxTime, getOptimalSolution, getOptStrategy, postprocessing, processing, setCostsWeightFactor, setCpuQuota, setDriverSpace, setExecutorSpace, setMinPrice, setMinTime, updateOptimalSolution
-
Field Details
-
MINIMUM_RELEVANT_MEM_ESTIMATE
public static final long MINIMUM_RELEVANT_MEM_ESTIMATE- See Also:
-
USE_MEMORY_DELTA
public static final boolean USE_MEMORY_DELTAdifferent instance families can have slightly different memory characteristics and using memory delta allows not ignoring equivalent instances of different families (e.g. newer generation use 7.5/15.25/30.5/... GB memory instead of 8/16/32/...)- See Also:
-
MEMORY_DELTA_FRACTION
public static final double MEMORY_DELTA_FRACTION- See Also:
-
MEMORY_FACTOR
public static final double MEMORY_FACTOR -
BROADCAST_MEMORY_FACTOR
public static final double BROADCAST_MEMORY_FACTOR- See Also:
-
CACHE_MEMORY_FACTOR
public static final double CACHE_MEMORY_FACTOR- See Also:
-
-
Constructor Details
-
InterestBasedEnumerator
public InterestBasedEnumerator(Enumerator.Builder builder, boolean interestLargestEstimate, boolean fitDriverMemory, boolean interestBroadcastVars, boolean interestOutputCaching)
-
-
Method Details
-
preprocessing
public void preprocessing()Description copied from class:EnumeratorCalled once to enumerate the search space for VM instances for driver or executor nodes. These instances are being represented as- Specified by:
preprocessingin classEnumerator
-
evaluateSingleNodeExecution
public boolean evaluateSingleNodeExecution(long driverMemory, int cores) - Specified by:
evaluateSingleNodeExecutionin classEnumerator
-
estimateRangeExecutors
public ArrayList<Integer> estimateRangeExecutors(int driverCores, long executorMemory, int executorCores) Description copied from class:EnumeratorEstimates the minimum and maximum number of executors based on given VM instance characteristics, the enumeration strategy and the user-defined configurations- Specified by:
estimateRangeExecutorsin classEnumerator- Parameters:
driverCores- CPU cores for the currently evaluated driver nodeexecutorMemory- memory of currently evaluated executor nodeexecutorCores- CPU cores of currently evaluated executor node- Returns:
- - [min, max]
-
getMemoryEstimates
public static TreeSet<Long> getMemoryEstimates(Program currentProgram, boolean outputOnly, double memoryFactor) Extracts the memory estimates which original size is larger thanMINIMUM_RELEVANT_MEM_ESTIMATE- Parameters:
currentProgram- program for extracting the memory estimates fromoutputOnly-true- output estimate only;false- sum of input, intermediate and output estimatesmemoryFactor- factor for reverse scaling the estimates to avoid scaling the search space parameters representing the nodes' memory budget- Returns:
- memory estimates in ascending order ensured by the
TreeSetdata structure
-
interestEstimatesInCPEnabled
public boolean interestEstimatesInCPEnabled() -
interestBroadcastVars
public boolean interestBroadcastVars() -
interestLargestEstimateEnabled
public boolean interestLargestEstimateEnabled() -
interestOutputCachingEnabled
public boolean interestOutputCachingEnabled()
-