How to resolve long GC Old intervals

Hey, currently running a 1.19.2 fabric server with ~250 mods. One player and we have a GC Old interval of 144minutes and an average time of 1600ms. Spark profiler incoming once it runs for longer enough.
73 Replies
Admincraft Meta
Admincraft Meta6mo ago
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by skullians#0
Skullians
SkulliansOP6mo ago
@Jared | InfraCharm Going to add the flags you sent when I get to it
Jared | InfraCharm
-XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log Add these
Skullians
SkulliansOP6mo ago
Currently a little busy as am on mobile yeah will do in a bit, sorry PrintGCDateStamps doesn't exist apparently .-.
Jared | InfraCharm
What version you running?
Skullians
SkulliansOP6mo ago
GraalVM CE Java 17
Jared | InfraCharm
-Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M That's all you need then if you're on GraalVM
Skullians
SkulliansOP6mo ago
to replace these?
Jared | InfraCharm
Mhm
Skullians
SkulliansOP6mo ago
on it I'm assuming you'll want the gc.log?
Jared | InfraCharm
mhm
Skullians
SkulliansOP6mo ago
when? do you want me to wait until it's reached 10mb?
Jared | InfraCharm
Sure may be a while though you dont have to
Skullians
SkulliansOP6mo ago
okay :ThumbsUp: already 500 lines long :KEKW:
Skullians
SkulliansOP6mo ago
https://spark.lucko.me/wBq52aP21h spark profiler if you wish
spark
spark is a performance profiler for Minecraft clients, servers, and proxies.
Admincraft Meta
Admincraft Meta6mo ago
Spark Profile Analysis
❌ Processing Error
The bot cannot process this Spark profile. It appears that the platform is not supported for analysis. Platform: Fabric
Requested by skullians#0
Skullians
SkulliansOP6mo ago
this is running chunky however I get similar GC times with no pregen
Jared | InfraCharm
Did you stop the server before sending that?
Skullians
SkulliansOP6mo ago
no, that's a stopped profiler why?
Jared | InfraCharm
I need the gz.log
Skullians
SkulliansOP6mo ago
Admincraft Meta
Admincraft Meta6mo ago
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
Requested by skullians#0
Jared | InfraCharm
You're on G1 no support for NUMA or LPS java -Xms11264M -Xmx11264M --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=300 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1HeapWastePercent=10 -XX:G1MixedGCCountTarget=8 -XX:InitiatingHeapOccupancyPercent=30 -XX:G1MixedGCLiveThresholdPercent=85 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=5 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=35 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=4M -XX:G1ReservePercent=20 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M -jar server.jar --nogui Run with these, we will start tuning your GC to be more efficient. Send the log after an hour @Skullians
Skullians
SkulliansOP6mo ago
is 11GB too much? The container only has 12 Am I okay to set Xms / Xmx to 10GB?
Jared | InfraCharm
Sure java -Xms10240M -Xmx10240M --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=300 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1HeapWastePercent=10 -XX:G1MixedGCCountTarget=8 -XX:InitiatingHeapOccupancyPercent=30 -XX:G1MixedGCLiveThresholdPercent=85 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=5 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=35 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=4M -XX:G1ReservePercent=20 -jar server.jar --nogui
Skullians
SkulliansOP6mo ago
(that doesn't have the gc log lol) dw I just changed the flags before
Jared | InfraCharm
ah okay
Skullians
SkulliansOP6mo ago
20 minutes more until 1 hour server kept crashing ._.
Jared | InfraCharm
Why crash
Skullians
SkulliansOP6mo ago
nothing related to RAM or GC one of my mods causing a ConcurrentModificationException during chunk gen
Skullians
SkulliansOP6mo ago
@Jared | InfraCharm
Skullians
SkulliansOP6mo ago
server was on the verge of OOMing
Jared | InfraCharm
Thanks i’ll take a look in a second
Skullians
SkulliansOP6mo ago
no rush
Jared | InfraCharm
So this time you are running out of memory quickly and your GC is evacuating
java -Xms10240M -Xmx10240M --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1HeapWastePercent=10 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=85 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=60 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
-jar server.jar --nogui
java -Xms10240M -Xmx10240M --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1HeapWastePercent=10 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=85 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=60 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M
-jar server.jar --nogui
Try this, it will streamline everything under fewer GC threads and pause for less time, meaning more cleanup. @Skullians
Skullians
SkulliansOP6mo ago
there's two instances of gc log flags in there should I remove it?
Jared | InfraCharm
did I paste it twice oof Yes remove it
Skullians
SkulliansOP6mo ago
okay :ThumbsUp: want me to run it for another hour?
Jared | InfraCharm
Yep
Ŧøᵾȼħɨn̷ǥǤɍa̷s̷s
is geyser against the rules here?
Skullians
SkulliansOP6mo ago
no, why?
Ŧøᵾȼħɨn̷ǥǤɍa̷s̷s
js wanted to make sure haha
Skullians
SkulliansOP6mo ago
why ask in here xD
Jared | InfraCharm
Hey hey hey don't trash this thread make your own question
Ŧøᵾȼħɨn̷ǥǤɍa̷s̷s
ikik mb aight i made it. help this guy out and then if you dont mind can u help me too?
Skullians
SkulliansOP6mo ago
thanks so much though. will get back to you after an hour :) ping me in your #questions thread. if you need help
Skullians
SkulliansOP6mo ago
RAM usage is already tons better. 9.86GB / 12GB, compared to 11.5.
Skullians
SkulliansOP6mo ago
java GC startup flag tuning :Shruge: nearing 10gb now
Skullians
SkulliansOP6mo ago
@Jared | InfraCharm Been 1hr 26minutes
Admincraft Meta
Admincraft Meta6mo ago
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
Requested by skullians#0
Skullians
SkulliansOP6mo ago
at 10.4gb / 12gb which is much better
Jared | InfraCharm
java -Xms10G -Xmx10G --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1HeapWastePercent=10 -XX:G1MixedGCCountTarget=8 -XX:InitiatingHeapOccupancyPercent=30 -XX:G1MixedGCLiveThresholdPercent=85 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=5 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=35 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=4M -XX:G1ReservePercent=20 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M -jar server.jar --nogui
java -Xms10G -Xmx10G --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:G1HeapWastePercent=10 -XX:G1MixedGCCountTarget=8 -XX:InitiatingHeapOccupancyPercent=30 -XX:G1MixedGCLiveThresholdPercent=85 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=5 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=35 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=4M -XX:G1ReservePercent=20 -Xlog:gc*:file=gc.log:time,tags:filecount=5,filesize=10M -jar server.jar --nogui
So now your stuff is running smooth, just your heap is slowly increasing. To allow the server to be online longer between restarts, use the above. This is lowering your memory to 10GB and reserving a little more for GC @Skullians
Skullians
SkulliansOP6mo ago
:ThumbsUp: I’ll send you another log in an hour :D thank you so much!
Ŧøᵾȼħɨn̷ǥǤɍa̷s̷s
Do you think that by anychance you can fix my problem too
Skullians
SkulliansOP6mo ago
@Jared | InfraCharm if I ever need to increase my RAM (in container, not just in flags), what should the flags look like? Should anything change or should I just change the Xms and Xmx to container max - 2gb?
Jared | InfraCharm
If you're increasing the container's memory too, keep it the same ratio
Skullians
SkulliansOP6mo ago
:ThumbsUp: So if I had a 14gb container, flags would be 12GB?
Jared | InfraCharm
yep
Skullians
SkulliansOP6mo ago
got it, thanks.
Skullians
SkulliansOP6mo ago
@Jared | InfraCharm if you need it
Admincraft Meta
Admincraft Meta6mo ago
We have uploaded your file to a paste service for better readability
Paste services are more mobile friendly and easier to read than just posting a file
Requested by skullians#0
Jared | InfraCharm
Yeah we’ll take one more look
Skullians
SkulliansOP6mo ago
okay :D
Jared | InfraCharm
How many cores do you have?
Skullians
SkulliansOP6mo ago
4 threads (400%)
Jared | InfraCharm
So your GC is running efficiently, we can open it up to use more cores but that will take away from your server and any mods that may be multithreaded. Up to you
Skullians
SkulliansOP6mo ago
I’d say keep it the same for now. It seems to be doing well and 10GB usage is realistically decent for doing 2 pregens at the same time. Don’t have any mods with multithreading and the server needs all the perf it can get
Jared | InfraCharm
Sounds good - happy this is resolved 🙂
Skullians
SkulliansOP6mo ago
Thankyou so much again! !solved
Admincraft Meta
Admincraft Meta6mo ago
post closed!
The post/thread has been closed!
Requested by skullians#0

Did you find this page helpful?