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

MP: Severe lag and memory leak when a lot of new chunks are generated

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 1.7.4
    • Ubuntu 10.04LTS x64, Oracle Java JRE 1.7.0_45
    • Unconfirmed
    • Survival

      When I explore a lot (causing a lot of new chunks to be generated), the server's memory and CPU usage rises permanently causing major lag and ultimately the server crashes with an OutOfMemory exception.

      During normal play (even with more players online), memory usage never exceeds a few 100 MB and CPU load remains well below 25%.

      Under the aforementioned conditions, a single core is fully saturated (CPU load 100%) and memory usage raises until JVM heap limit is hit (already raised to 2 GB in my setup).

      Reducing the view distance helped a little, but setting it below 8 did not improve the behaviour further.

      Even long before the crash the following symptoms can be observed:

      • lot of "can't keep up" messages on the server console
      • player unable to move, "jittering" and then appearing at a position from several seconds ago
      • almost no hostile mobs spawning at night
      • very slow response to console commands (e.g. time set, tp), I usually have to wait several seconds before the requested action is performed.

      How to reproduce
      1. Set up a new multiplayer server
      2. Walk around a lot (e.g. some 1000 blocks into one direction)
      3. Watch server load and memory usage on Linux console (e.g. top)

      I assume that new generated chunks are not removed from memory once the are out of the player's range unlike chunks that are loaded from disk.

      Update #1 (2013-12-27 21:14): high load and memory usage persists even if the last player has disconnected. Another server instance (same game version, same JRE, same settings) running on the same machine but with a more "standard" workload does not exhibit this behaviour, it can handle 5 simultaneous users without noticeable lag, CPU load or memory consumption.

            Unassigned Unassigned
            Supermax1971 Gregor Kuhlmann
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: