Hello, from reading the documentation garbage collection will occur if the JVM heap percentage is 75% or above - I'm wondering does GC happen as soon as 75% is reached or does it need to spend some time at 75% or above before GC is initialised?
I only ask because on some of our nodes the JVM heap usage does reach 75% but only briefly.
It is as soon as it hits 75%. The JVM heap usage only drops because of GC, so if you see that it reaches 75% and drops right after, that drop was because of GC.
That is a normal operation, BTW. It should only a problem if, every time it drops, the previous minimum heap is not restored/repeated (i.e the new minimum is higher than the last).
Hello, thanks very much for the reply; I have one last question - if I am hitting a GC then from what I've read elasticsearch stops, no code is executing - does that mean that logs sent to elasticsearch are potentially being dropped?
The behavior you are describing is called GC (or memory) pressure. Normally, GC happens really fast (just a few milliseconds) and that is not a problem.
It will only become a problem if it takes seconds to minutes to execute and that situation will be visible in the logs as a WARN message. Still, it doesn't necessarily means you are losing logs, unless you are using clients that can not handle backpressure (Logstash and Beats can do it).
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.