Garbage Collection
Detailed guide to Java garbage collection tuning for Minecraft servers.
Illustrated procedure
Screenshots show the current application with demonstration data. Use your own service details; click an image to inspect it at full size.
Check the console
Open Essentials → Console. Check the current state, startup output and errors before making changes. Wait for Done or your software’s ready message before joining.

Enter a supported command
Use the command field beneath the console. Panel console commands normally omit the leading slash. This example uses the read-only command list; use commands supported by your core or plugin.

Check the command response
Press Enter once, then read the response in the console. Confirm the target and effect before sending an administrative command. Example output is not a performance measurement.

Establish whether collection coincides with the lag
GC reclaims Java heap objects that are no longer needed. Pauses depend on collector, heap and workload; a fixed duration table cannot diagnose every server.
Record the time and timezone alongside resource charts and a spark report. Game logs and dedicated GC logs serve different purposes. latest.log is not guaranteed to contain collection events.
Gather evidence
- Check commands with
spark help, then inspect health information and GC history in a supported version. - Before enabling dedicated logging, confirm that the startup command is editable and the log directory exists and is writable.
- For Java versions supporting unified logging, the following is a rotating-log example. It is a startup argument, not a console command.
-Xlog:gc*:file=logs/gc.log:time,uptime,level,tags:filecount=5,filesize=1MThis rotates GC logs; it does not replace game logs. Confirm syntax for your Java version and preserve the original startup settings. Resolve directory and permission issues first.
Adjust from the findings
Compare pause frequency and duration with the incident. Investigate identified plugins, mods or workload changes first. Evaluate heap settings and collectors using the JVM guide; matching the initial and maximum heap is not a universal requirement.
Reference: Java startup options and unified logging.