I was profiling an java process, and metrics did not seem out of place. I kept on eye on them for a couple of hours, and then I decided to turn on Object Allocation Count so I could see the rate at which new object are allocated. Somehow this caused a regime change in how my eden space grows and gets cleaned. I have no clue how to explain that, so I'll add a screen shot here:
The pink vertical line is the instant at which I enabled the tracking of object allocation. You can see that before that line, the eden space allocation is not very regular, but nothing suspicious. GC and GC pauses in the meantime are a bit frequent for me, but they still don't seem crazy high. Then past that line, you can clearly see the way the eden space grows and decreases becomes a lot smoother and regular. But more surprising is the change in GC Pauses and GC Collection. All of a sudden they became a LOT less frequent.
Has anyone any idea how this happened? It is pretty fair to say this was not a coincidence, and I'd like to understand how this profiling change had this effect. Assuming that this effect is real, I would want to be able to reproduce it without needing the profiler, so that my program spends a lot less time doing GC and GC Pauses.
Environment: Linux, Java 11, G1GC, YourKit.