Direct answer
GC may pause gameplay, but a rising memory graph alone does not prove that garbage collection is responsible. Correlate pauses and high MSPT at the same timestamps.
Identify the failing layer
Garbage collection reclaims Java heap objects; a pause can affect ticks, but heap growth can also be normal between collections.
First checks and evidence
- Record heap size, Java version and container RAM limit; verify that the process is not being killed by the OS.
- Collect a spark GC report or Java GC logs where available and identify actual pause durations.
Admin diagnosis and repair
- Compare the pause times with player lag reports and a spark tick-time profile.
- Reduce measured allocation pressure or a misbehaving plugin before changing collector flags; change one variable and retest.
Verify the fix: Compare identical player workloads before and after the change, including pause length, MSPT and memory headroom.
Important safety note
Increasing -Xmx without host headroom can trigger swapping or an OOM kill; collector flag recipes are not universal.
References
Use the documentation for the exact software and release you run. These sources support the settings or diagnostic behavior used in this fix.
Related fixes and guides
Help us improve this article
Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.