CaffeineMC / lithium-fabric

A Fabric mod designed to improve the general performance of Minecraft without breaking things
GNU Lesser General Public License v3.0
1.94k stars 189 forks source link

TPS Spikes #519

Open Squidistry opened 5 months ago

Squidistry commented 5 months ago

Version Information

lithium-fabric-mc1.20.1-0.11.2 Causing tps spikes above 1300

Actual Behavior

Caused tps to spike

Reproduction Steps

Install Lithium

Other Information

https://spark.lucko.me/1blXmWAwU1 PalettedContainer.serialize() causing it to spike

2No2Name commented 5 months ago

Maybe try adding the line mixin.chunk.serialization=false to the lithium.properties in the config folder and test again

Libreh commented 3 months ago

I had the same TPS spike yesterday on 1.21, it too got down to PalettedContainer.serialize(), it's hard to re-produce since it appears to only occur for me after an hour or two (or a lot of chunk loading).

jellysquid3 commented 3 months ago

It is worth mentioning that chunk serialization is slow and the time it takes depends on how complex the chunks are. That means, if they have more mobs or block entities, the server will need more time to save them. And the more chunks the server is waiting on to save, the longer the spikes will become as it tries to work through the backlog.

Libreh commented 3 months ago

I don't remember getting this before 1.21 though, it's weird. I remember playing 1.20.4 with 20 chunks just like I do now and I wouldn't get this. It still happens with mixin.chunk.serialization=false.