Mojira Archive
MC-103656

Excessive use of System.gc()

General issue: Some "lags" when playing on a local minecraft server. Example, mobs and players are moving "step-by-step".
Monitoring CPU, RAM and Disk usage, it appears than the computer does almost "nothing". RAM usage is under 10% in the JVM (when i'm connected alone, locally).

Command line with options used for the tests : java -server -Xmx2G -Xms2G -jar minecraft_server.1.10.jar
I also tried with 4GB, 8GB, and with several GC options.

After adding garbage collector logging flags on the command line, i was quickly able to see a lot of (useless) calls to "System.gc()". In my opinion, and knowing the java language, this is not a good thing. I guess the repeated call to this procedure is not intentional.

To be sure, I added the "-XX:+DisableExplicitGC" flag to the command line, and this solved the issue.

I think that adding "-XX:+DisableExplicitGC" to the arguments should only be a workaround, and that a "real" fix (removing the problematic System.gc() call) should be released.

Thank you

Fixed

Rahpael Guilabert

2016-06-14, 08:12 PM

2018-10-03, 02:18 PM

2018-10-03, 02:18 PM

7

5

Unconfirmed

Minecraft 1.10, Minecraft 1.12.2, Minecraft 18w07c

Minecraft 1.13.1