I'm using Aikar's Flags for my server but I was wondering if I could replace G1GC with Shenandoah?
I'm not super knowledgeable on the subject, but from what I can gather, Shenandoah is a superior garbage collector. I don't remember where I got it from, but the arguments I have for my client arguments uses Shenandoah, so now I'm wondering if I can use it for the server as well.
The following are the arguments given by Aikar's Flags. What would I need to remove and add to get rid of G1GC and add Shenandoah?
java -Xms8192M -Xmx8192M --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -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 -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -jar server.jar --nogui
9 Replies
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 lightningferix#0
Minecraft Flags Generator - Birdflop
A simple script generator to start your Minecraft servers with optimal flags. Birdflop is a registered 501(c)(3) nonprofit Minecraft host aiming to provide affordable and accessible hosting and resources. Check out our plans starting at $2/GB for some of the industry's fastest and cheapest servers, or use our free public resources.
you can set it to Shenandoah here
Shendoah isnt a superior one by much (and has pretty big downsides), its one of the worse options to choose
java 21 + generational zgc can work better than G1GC, so would use that
if you dont want to use gc1c
Nah don't use shen
Does this apply to clients too or just servers
zgc is for high memory counts
if you're allocating a huge amount of ram on your client
why..
No I don't I give my client 4gb
I was just wondering bc I thought g1gc was better on the server and the client but now you say zgc is better on 21+, so I'm interested
it can be better, its meant to have pauseless gc, but its not a one size fits all