Chisels & Bits - For Fabric

Chisels & Bits - For Fabric

2M Downloads

Loading a large number of chiseled blocks at once causes server to drop other players

m98blk opened this issue ยท 2 comments

commented

Game version: 1.19.2
C&B version: 1.3.135-fabric (also confirmed on 1.3.126-forge)
Not using any other mods that add or modify blocks.
Server HW we tried: Threadripper CPU, 32 GB RAM, game on SSD / Ryzen 5 CPU, 16 GB RAM, game on SSD
Server-side settings: render distance 15, simulation distance 12

Whenever a player loads a large number of chiseled blocks at once, the server begins to lag.

When loading distant chunks when walking, if they contain many chiseled blocks, this causes a freeze of up to 10 seconds per chunk of distance walked. When loading a lot of such chunks at once (for example when joining and spawning inside an area with many chiseled blocks everywhere), the server kicks/times out players other than the one loading the chunks. This makes it difficult for 2 or more players to collaborate on large structures in multiplayer, because the workaround is for newcomers to spawn outside the area and then walk back slowly, causing everyone to lag constantly until they arrive and load all the chunks.

There is no error in the log, only the typical warn stating the server is ~50 seconds behind and may be overloaded.

This issue began manifesting as our build progressed, at first there was only a lag spike when someone was joining, but it reached a point where everyone else just gets timed out. Disabling C&B obviously ruins the map but fixes the issue completely.

Additionally, for the player spawning in a "densely chiseled" area, it can take up to 10 minutes to load all the chiseled block models/textures. They remain invisible but have collision (and targeting them shows the correct shape outline) and then appear all at once. This in itself doesn't seem to introduce any instability to the gameplay and is only a minor annoyance. When loading chunks slowly from a distance, this delay seems to be small enough that by the time the player reaches the loaded area, all blocks are already visible.

commented

Mc Version 1.19.2:
Mod Version : 1.1.35
Memory usage Spikes when Chisel and bits is on the edge of the render distance, it spikes ,often when building to between 3-4 GB/s typically although I've seen it spike as high as 9 GB/s. I do have large number of chisel and bits blocks in 1 building when this is occurring located in the lazy chunks. I test with and without the sodium forge port (Rubidium) and the issue was present without it to eliminate sodium as a variable.
I have 12 GB of Memory allocated to the client and 6GB for the server and I have render set to 16 and Simulation set to 10.

2023-04-15_22 24 06
2023-04-15_22 24 38
2023-04-15_23 00 20

Same issue tbh when it comes to loading them in.

commented

I believe I've encountered a similar issue on 1.18.2, this time in a singleplayer world. This may be an issue with the client sided rendering thread. I've used ModernFix's internal server watchdog to provide a thread dump at the time of the "crash" here: https://gist.github.com/CatzRule81/ecb575db1f16ba180427a2a257c19d02

EDIT: Also tried lowering render distance and playing with Embeddium's tile entity culling functions, that didn't work.