We have this decent server with J-Heap at 20GB. How ever, I just saw a pause the world detected, I though this could only be possible when the memory almost hit the heap, but in the time range where the event happened the memory is far from 20GB. In fact, the avg pick is always 10GB. Question
What else can produce this clock drift?
The JVM can’t capture thread details while they are running. So there’s a brief pause when collection information about all threads for a thread dump. For a busy system with lots of threads, this is noticeable.
The G1GC algorithm will run more often when pauses exceed that threshold, and run less often when pauses are substantially less. It is a heuristic, not a hard rule, but G1GC is pretty good at keeping pauses under the target maximum.