Our application is latency critical. In order to reduce GC pauses, we reuse objects. In beginning of the process we allocate a lot of small objects and then (almost) no memory allocated. However, I still see following log of gc:
2016-12-18T13:51:48.650+0200: 1.085: Total time for which application threads were stopped: 0.0001411 seconds, Stopping threads took: 0.0000203 seconds
2016-12-18T13:51:48.776+0200: 1.210: Total time for which application threads were stopped: 0.0002027 seconds, Stopping threads took: 0.0000183 seconds
2016-12-18T13:51:48.894+0200: 1.328: Total time for which application threads were stopped: 0.0002559 seconds, Stopping threads took: 0.0000194 seconds
2016-12-18T13:51:48.906+0200: 1.341: Total time for which application threads were stopped: 0.0002159 seconds, Stopping threads took: 0.0000199 seconds
2016-12-18T13:51:49.047+0200: 1.482: Total time for which application threads were stopped: 0.0002842 seconds, Stopping threads took: 0.0000208 seconds
As far, as I understood, JVM stops process to run over all references and mark objects. Is it correct?
Also I see that frequency of such logs decrease with a time. So i think GC tunes some internal parameters and I wish to provide them on the start. Now I run process with following arguments:
-Xms10240m
-Xmx10240m
-server
-XX:+UseG1GC
-noclassgc
All rest arguments related to verbosing GC. Our machine have enough memory to completely avoid gc. How can I explain it to java?
OS: Linux, JVM either oracle or openJDK.
Thank you.