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_THRESHOLD
If mem-usage is above this threshold, active threads are set to 0
|
static FloatConfOption |
AM_LOW_THRESHOLD
If mem-usage is below this threshold, active threads are set to max
|
static LongConfOption |
CHECK_MEMORY_INTERVAL
Memory check interval in msec
|
static FloatConfOption |
CREDIT_HIGH_THRESHOLD
If mem-usage is above this threshold, credit is set to 0
|
static FloatConfOption |
CREDIT_LOW_THRESHOLD
If mem-usage is below this threshold, credit is set to max
|
static FloatConfOption |
GC_MINIMUM_RECLAIM_FRACTION
Used to detect a high memory pressure situation
|
static FloatConfOption |
MANUAL_GC_MEMORY_PRESSURE
If mem-usage is above this threshold and no Full GC has been called,
we call it manually
|
static FloatConfOption |
OOC_THRESHOLD
OOC 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 OutOfCoreOracle
public OutOfCoreOracle.IOAction[] getNextIOActions()
OutOfCoreOracle
getNextIOActions
in interface OutOfCoreOracle
public boolean approve(IOCommand command)
OutOfCoreOracle
approve
in interface OutOfCoreOracle
command
- the IO command that is about to executepublic void commandCompleted(IOCommand command)
OutOfCoreOracle
commandCompleted
in interface OutOfCoreOracle
command
- the IO command that is completedpublic void gcCompleted(com.sun.management.GarbageCollectionNotificationInfo gcInfo)
gcCompleted
in interface OutOfCoreOracle
gcInfo
- GC informationCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.