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?
[media]Attachments
Comments 6
I have now attached the client and server profiles to the issue. I wasn't getting the lag spike quite as big as before but it was still noticeable while it occurred (~500ms).
Have you tried disabling sync-chunk-writes in the server.properties file? The option was introduced a few versions ago and I believe this defaults to true on Windows to fix some other issues
Im getting this same βerrorβ on a 1.21.1 Fabric (would like to test it on vanilla java but the world is heavily moddedβ¦) server. Weird thing it is only happening with one of our machines .
We do not have enough information to find the cause of this issue.
While the lag occurs, please press
F3
+L
once, then wait a short moment until profiling has finished.Afterwards, please attach the generated
.zip
file containing the profiling results here. The file path is shown in chat; the file can be found in[minecraft/debug/profiling/<DATE>.zip|https://minecrafthopper.net/help/finding-minecraft-data-folder/]
.If you are playing on a server please additionally run the command
/perf start
to create a profiling report for the server. In case you do not have the permission to run this command, make sure that you're a server operator.Once profiling has finished, please attach the generated
.zip
file fromdebug/profiling/<DATE>.zip
of the server folder.This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
π Bug Tracker Guidelines β π¬ Community Support β π§ Mojang Support (Technical Issues) β π§ Microsoft Support (Account Issues)
π Project Summary β βοΈ Feedback and Suggestions β π Game Wiki