Garbage Collection is running, but it’s running extremely slow

Hey everyone! Quick question: I’m still struggling with garbage collection on my server. Every so often my server will randomly drop GBs of RAM usage, which is great! But, 9/10 times it’s after the server has reached a completely untenable amount of RAM usage.

I made a post recently about RAM issues, and decided to fork over the extra $5 to increase RAM on my server by 2 GB, for a total of 8. I’m also limiting the server to 7 GB of usage overall for overhead.

However, RAM usage is still running extremely high until GC kicks in. Something I’ve noticed as well is running a spark heap dump seems to clear out a ton of RAM as well.

Am I going nuts, or have I done something wrong in my startup flag configuration?

Flags are as follows (side note: host won’t let me changed Xms):

java -Xms128M -Xmx6656M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -Dterminal.jline=false -Dterminal.ansi=true -jar paper-1.20.1-83.jar
GC.png
HeapDump.png
Was this page helpful?