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

Minecraft does not properly unload chunks (bad/missing chunk garbage collection)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • Minecraft 1.7.4
    • None
    • Dedicated server, Linux 64-bit, Oracle JDK 1.7.0.51
    • Plausible

      The minecraft server does not always properly unload the chunks that should get unloaded when a player moves out of range.

      (On my small (1-5 people) server, since 1.7-ish, the problem seems to be getting even worse than it has been before.)

      Almost all the region files that have been touched since the server was started, remain active and written to every 45 seconds until the minecraft server is restarted. This is a really annoying problem when it comes to the backups, since I'm using incremental backups, so only the files that have changed since the last backup will get included. Now, since the server keeps practically all the region files active and constantly writes to them, the backups will get multiple times bigger than they need to be, unless I restart the server before each backup, so that the region files stop been written to before the next backup cycle.

      Also, since all the active region files are written to every 45 seconds, this generates large amounts of unneeded disk writes to my SSD, each region file being in the range of about 4-8 MB. The worst case I have caught, is after all the players had logged off (so nobody was on the server), a whole whopping 40 region files were still being kept active and written to every 45 seconds.

      Since the game is built around the concept of chunks, and only those chunks are supposed to be loaded and active that are within a certain radius of the player (plus spawn chunks), I would really hope that the game would actually work as is intended, and not cause this extra stress on the system running the server.

      I know Spigot (and possibly Bukkit?) has proper chunk garbage collection, but I don't want to use 3rd party solutions to fix problems that shouldn't even exist if the server worked as it is supposed to.

      Note: This bug report is for a pure vanilla server, following is additional/related information from a modded server:

      While playing with mods I have access to a ChunkViewer (from ChickenChunks). I have used that a lot to observe the loaded chunks on my FTB servers. Using that, I have noticed that often when the player moves around, a long strip of chunks are left loaded from the edge of the player loaded region when the player moves away. Also sometimes smaller chunk clusters remain. When I move closer to such loaded areas so that my player loaded region overlaps them, and then move away again, often those areas then unload properly.

            Unassigned Unassigned
            masa Matti Ruohonen
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: