Mojira Archive
MC-279194

Sever tick lag spike while data files are saving

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?

Unresolved

TCAtrevor

2025-01-08, 03:09 AM

2025-01-22, 11:47 PM

0

2

Unconfirmed

(Unassigned)

1.21.4

-