public class ThresholdBasedOracle extends Object implements OutOfCoreOracle
OutOfCoreOracle.IOAction
Modifier and Type | Field and Description |
---|---|
static LongConfOption |
CHECK_MEMORY_INTERVAL
The interval at which memory observer thread wakes up.
|
static FloatConfOption |
EMERGENCY_MEMORY_PRESSURE
The memory pressure at which the job is cloe to fail, even though we were
using maximal disk bandwidth and minimal network rate.
|
static FloatConfOption |
FAIL_MEMORY_PRESSURE
The memory pressure at/above which the job would fail
|
static FloatConfOption |
HIGH_MEMORY_PRESSURE
The memory pressure at which the job is suffering from GC overhead.
|
static LongConfOption |
LAST_GC_CALL_INTERVAL
Memory observer thread would manually call GC if major/full GC has not
been called for a while.
|
static FloatConfOption |
LOW_MEMORY_PRESSURE
The memory pressure at/below which the job can use more memory without
suffering from GC overhead.
|
static FloatConfOption |
OPTIMAL_MEMORY_PRESSURE
The memory pressure at which we expect GC to perform optimally for a
memory intensive job.
|
Constructor and Description |
---|
ThresholdBasedOracle(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)
Notification of GC completion.
|
OutOfCoreOracle.IOAction[] |
getNextIOActions()
Get the next set of viable IO actions to help bring memory to a more
desired state.
|
void |
startIteration()
Called at the beginning of a superstep.
|
void |
updateRates(double usedMemoryFraction)
Update statistics and rate regarding communication credits and number of
active threads.
|
public static final FloatConfOption FAIL_MEMORY_PRESSURE
public static final FloatConfOption EMERGENCY_MEMORY_PRESSURE
public static final FloatConfOption HIGH_MEMORY_PRESSURE
public static final FloatConfOption OPTIMAL_MEMORY_PRESSURE
public static final FloatConfOption LOW_MEMORY_PRESSURE
public static final LongConfOption CHECK_MEMORY_INTERVAL
public static final LongConfOption LAST_GC_CALL_INTERVAL
public ThresholdBasedOracle(ImmutableClassesGiraphConfiguration conf, OutOfCoreEngine oocEngine)
conf
- configurationoocEngine
- out-of-core enginepublic void updateRates(double usedMemoryFraction)
usedMemoryFraction
- the fraction of used memory over max memorypublic 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)
OutOfCoreOracle
gcCompleted
in interface OutOfCoreOracle
gcInfo
- GC informationpublic void startIteration()
OutOfCoreOracle
startIteration
in interface OutOfCoreOracle
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.