I would like to ask question about threshold setting for GC Overehead .
I checked this on elasticsearch v 6.4.2 .
I am testing the GC setting to understand the concept of threshold of GC Overhead and GC Collections.
Looking at the code , I was able to setup each setting as below. Values are defaults.
# GC Logging
monitor.jvm.gc.collector.young.warn: 1000ms
monitor.jvm.gc.collector.young.info: 700ms
monitor.jvm.gc.collector.young.debug: 400ms
monitor.jvm.gc.collector.old.warn: 10000ms
monitor.jvm.gc.collector.old.info: 5000ms
monitor.jvm.gc.collector.old.debug: 2000ms
monitor.jvm.gc.overhead.warn: 100
monitor.jvm.gc.overhead.info: 25
monitor.jvm.gc.overhead.debug: 10
Looking at the code, GC Overhead seems to be compared with percentage.
# GC Overhead is compared with "fraction". "fraction" is the amount of total time spend for Collections from last time GC stats was monitored.
void checkGcOverhead(final long current, final long elapsed, final long seq) {
final int fraction = (int) ((100 * current) / (double) elapsed);
Threshold overheadThreshold = null;
if (fraction >= gcOverheadThreshold.warnThreshold) {
overheadThreshold = Threshold.WARN;
} else if (fraction >= gcOverheadThreshold.infoThreshold) {
overheadThreshold = Threshold.INFO;
} else if (fraction >= gcOverheadThreshold.debugThreshold) {
overheadThreshold = Threshold.DEBUG;
}
if (overheadThreshold != null) {
onGcOverhead(overheadThreshold, current, elapsed, seq);
}
}
So , is it correct to understand that you need to specify the threshold of GC Overhead in percentage ?
I appreciate if I could get some help with my question.