Ah, Windows. The jvm.options file doesn't work in Windows. If LS_HEAP_SIZE works for now, great. It might go away in the future. In that case, you should instead edit setup.bat to use the JVM settings you want.
To address your concern, the blue line (marked as "UsedHeap") is tracking your heap usage. The pink line (marked as "MaxHeap") is not quite 2x your set heap size. Under some conditions, the Xmx may be exceeded by the JVM, and this arrangement helps us to show what's going on in such a case. As you will note, though, the blue line is staying comfortably below the 512m mark, and is doing garbage collection very regularly. Perhaps a bit too rapidly, in fact. I would suggest doubling your heap size to 1g to see if it helps. Your event processing sawtooth pattern will be more even with fewer garbage collection events from Logstash.
but if you compare the heap usage size - the visual VM shows, that the heap size stays below 220m, and the LS statistics shows almost doubled values (around 400m).
To be honest, I'd trust the visualVM data
We'll investigate. Truthfully, it may have something to do with metric collection on windows, and the libraries being used. On my own (linux) system, I see the same behavior with the JVM, and the GC is triggered exactly at the Xmx threshold.
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.