Package org.apache.ignite.internal
Class LongJVMPauseDetector
- java.lang.Object
-
- org.apache.ignite.internal.LongJVMPauseDetector
-
public class LongJVMPauseDetector extends Object
Class for detection of long JVM pauses. It has a worker thread, which wakes up in cycle everyPRECISION(default is 50) milliseconds, and monitors a time values between awakenings. If worker pause exceeds the expected value more thanTHRESHOLDdefault is 500), the difference is considered as JVM pause, most likely STW, and event of long JVM pause is registered. The values ofPRECISION,THRESHOLDandEVT_CNT(event window size, default is 20) can be configured in system or environment properties IGNITE_JVM_PAUSE_DETECTOR_PRECISION, IGNITE_JVM_PAUSE_DETECTOR_THRESHOLD and IGNITE_JVM_PAUSE_DETECTOR_LAST_EVENTS_COUNT accordingly.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_JVM_PAUSE_DETECTOR_THRESHOLDIgnite JVM pause detector threshold default value.static intDFLT_JVM_PAUSE_DETECTOR_LAST_EVENTS_COUNTstatic intDFLT_JVM_PAUSE_DETECTOR_PRECISION
-
Constructor Summary
Constructors Constructor Description LongJVMPauseDetector(IgniteLogger log)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanenabled()@Nullable IgniteBiTuple<Long,Long>getLastLongPause()longgetLastWakeUpTime()voidstart()Starts worker if not started yet.voidstop()Stops the worker if one is created and running.StringtoString()
-
-
-
Field Detail
-
DEFAULT_JVM_PAUSE_DETECTOR_THRESHOLD
public static final int DEFAULT_JVM_PAUSE_DETECTOR_THRESHOLD
Ignite JVM pause detector threshold default value.- See Also:
- Constant Field Values
-
DFLT_JVM_PAUSE_DETECTOR_PRECISION
public static final int DFLT_JVM_PAUSE_DETECTOR_PRECISION
-
DFLT_JVM_PAUSE_DETECTOR_LAST_EVENTS_COUNT
public static final int DFLT_JVM_PAUSE_DETECTOR_LAST_EVENTS_COUNT
-
-
Constructor Detail
-
LongJVMPauseDetector
public LongJVMPauseDetector(IgniteLogger log)
- Parameters:
log- Logger.
-
-
Method Detail
-
start
public void start()
Starts worker if not started yet.
-
stop
public void stop()
Stops the worker if one is created and running.
-
enabled
public static boolean enabled()
- Returns:
falseifIgniteSystemProperties.IGNITE_JVM_PAUSE_DETECTOR_DISABLEDset totrue, andtrueotherwise.
-
getLastWakeUpTime
public long getLastWakeUpTime()
- Returns:
- Last checker's wake up time.
-
getLastLongPause
@Nullable public @Nullable IgniteBiTuple<Long,Long> getLastLongPause()
- Returns:
- Pair (
last long pause event time,pause time duration) ornull, if long pause wasn't occurred.
-
-