Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-103656

Excessive use of System.gc()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 1.13.1
    • Minecraft 1.10, Minecraft 1.12.2, Minecraft 18w07c
    • None
    • Windows 7
      JRE 8u91 (64-bits)
    • Unconfirmed

      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

            Unassigned Unassigned
            Faelucc Rahpael Guilabert
            Votes:
            7 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: