Garbage collection is a Java memory management tool that helps improve game performance. Beginning with Minecraft: Java Edition version 26.1-snapshot-1, the default garbage collector has changed. If you experience performance issues, you may want to switch back to the previous garbage collector.
Change the garbage collector in JVM Arguments
- Open the Minecraft Launcher and sign in with your Microsoft account.
- Select Minecraft: Java Edition on the left.
- Select the Installations tab at the top.
- Select the installation you want to change.
- Select More Options on the Edit installation screen.
- Copy all the text in the JVM arguments field and paste it into a text editor.
- Windows: Notepad
- macOS: TextEdit
- Save the text file so you can restore the original JVM arguments if needed.
- In the JVM arguments file, replace the phrase -XX:+UseZGC with -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M.
- Select Save.