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

Sever tick lag spike while data files are saving

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • 1.21.4
    • None
    • OS: Windows Server 2022
      Java: Oracle GraalVM 21.0.5+9.1
    • Unconfirmed
    • (Unassigned)

      I am running a dedicated Minecraft server that performs normal gameplay just fine but gets a massive (~3s) lag spike every 5 minutes, for only one tick. Using a performance profiler, the lag spikes come down to these methods:

      net.minecraft.world.level.storage.LevelStorage$Session.backupLevelDataFile()

      net.minecraft.server.PlayerManager.saveAllPlayerData()

      In my particular case, the level data file is taking the most time, but the player data seems to be significant as well. To confirm, when the lag spikes occur, I can plainly see the temp files being created for them in file explorer. Could these tasks be ran asynchronously on a separate thread as to not halt the server tick loop?

            Unassigned Unassigned
            TCAtrevor Trevor Andrews
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: