public class MemoryEstimatorOracle extends Object implements OutOfCoreOracle
OutOfCoreOracle that uses a linear regression model
 to estimate actual memory usage based on the current state of computation.
 The model takes into consideration 5 parameters:
 y = c0 + c1*x1 + c2*x2 + c3*x3 + c4*x4 + c5*x5
 y: memory usage
 x1: edges loaded
 x2: vertices loaded
 x3: vertices processed
 x4: bytes received due to messages
 x5: bytes loaded/stored from/to disk due to OOC.OutOfCoreOracle.IOAction| Modifier and Type | Field and Description | 
|---|---|
| static FloatConfOption | AM_HIGH_THRESHOLDIf mem-usage is above this threshold, active threads are set to 0 | 
| static FloatConfOption | AM_LOW_THRESHOLDIf mem-usage is below this threshold, active threads are set to max | 
| static LongConfOption | CHECK_MEMORY_INTERVALMemory check interval in msec | 
| static FloatConfOption | CREDIT_HIGH_THRESHOLDIf mem-usage is above this threshold, credit is set to 0 | 
| static FloatConfOption | CREDIT_LOW_THRESHOLDIf mem-usage is below this threshold, credit is set to max | 
| static FloatConfOption | GC_MINIMUM_RECLAIM_FRACTIONUsed to detect a high memory pressure situation | 
| static FloatConfOption | MANUAL_GC_MEMORY_PRESSUREIf mem-usage is above this threshold and no Full GC has been called,
 we call it manually | 
| static FloatConfOption | OOC_THRESHOLDOOC starts if mem-usage is above this threshold | 
| Constructor and Description | 
|---|
| MemoryEstimatorOracle(ImmutableClassesGiraphConfiguration conf,
                     OutOfCoreEngine oocEngine)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | approve(IOCommand command)Whether a command is appropriate to bring the memory to a more desired
 state. | 
| void | commandCompleted(IOCommand command)Notification of command completion. | 
| void | gcCompleted(com.sun.management.GarbageCollectionNotificationInfo gcInfo)When a new GC has completed, we can get an accurate measurement of the
 memory usage. | 
| OutOfCoreOracle.IOAction[] | getNextIOActions()Get the next set of viable IO actions to help bring memory to a more
 desired state. | 
| void | startIteration()Resets all the counters used in the memory estimation. | 
public static final LongConfOption CHECK_MEMORY_INTERVAL
public static final FloatConfOption MANUAL_GC_MEMORY_PRESSURE
public static final FloatConfOption GC_MINIMUM_RECLAIM_FRACTION
public static final FloatConfOption AM_HIGH_THRESHOLD
public static final FloatConfOption AM_LOW_THRESHOLD
public static final FloatConfOption CREDIT_HIGH_THRESHOLD
public static final FloatConfOption CREDIT_LOW_THRESHOLD
public static final FloatConfOption OOC_THRESHOLD
public MemoryEstimatorOracle(ImmutableClassesGiraphConfiguration conf, OutOfCoreEngine oocEngine)
conf - ConfigurationoocEngine - OOC engine.:wpublic void startIteration()
 The number of vertices to compute in the next superstep gets reset in
 GraphTaskManager.processGraphPartitions(org.apache.hadoop.mapreduce.Mapper<?, ?, ?, ?>.Context, java.util.List<org.apache.giraph.partition.PartitionStats>, org.apache.giraph.graph.GraphState, org.apache.giraph.comm.messages.MessageStore<I, org.apache.hadoop.io.Writable>, int)
 right before
 PartitionStore.startIteration() gets
 called.
startIteration in interface OutOfCoreOraclepublic OutOfCoreOracle.IOAction[] getNextIOActions()
OutOfCoreOraclegetNextIOActions in interface OutOfCoreOraclepublic boolean approve(IOCommand command)
OutOfCoreOracleapprove in interface OutOfCoreOraclecommand - the IO command that is about to executepublic void commandCompleted(IOCommand command)
OutOfCoreOraclecommandCompleted in interface OutOfCoreOraclecommand - the IO command that is completedpublic void gcCompleted(com.sun.management.GarbageCollectionNotificationInfo gcInfo)
gcCompleted in interface OutOfCoreOraclegcInfo - GC informationCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.