Lag spikes during thunderstorms when using Lithium
FelineAstronomer opened this issue ยท 4 comments
Version Information
Tested on both Lithium mc1.18.1-0.7.7 (as available on curseforge and the releases on github) and on a freshly compiled build of the latest commit of the 1.18.x/dev branch as of this post.
Expected Behavior
Server performance to remain consistent during a thunderstorm as it does during rain or clear weather
Actual Behavior
Server experiences lag, occasional lag spikes, some of which are very severe and last for up to 10 seconds, during a thunderstorm.
Reproduction Steps
- Create a fabric server with lithium installed
- Set server view-distance to 20 and simulation-distance to 8
- Connect 4 or more players and place them at a sufficient distance such that their respective view-distance chunks do not overlap
- Initiate a thunderstorm with /weather thunder
- Observe occasional lag spikes visible through block lag, player rubber-banding, and console messages consisting of "Can't keep up! Is the server overloaded?..."
Other Information
-
Tested with 4GB allocated memory to the JVM as well as 16GB allocated memory.
-
The server is running on an Intel i7-7700K processor.
-
The server with Lithium otherwise performs considerably better than if using an unmodded vanilla jar under clear weather or rain.
-
When the server is running unmodded, there is considerably lower TPS than with lithium, but the TPS is consistent with no hard lag spikes, regardless of rain, clear, or thunder weather settings.
-
When the server is operating with lithium, the lag spikes only appear during a thunderstorm.
Just a hunch, perhaps related to optimizations combining with the spawning of lightning, which appears as an entity? I did try going through the lithium config and comparing performance when disabling and enabling various components, but to no success.
There is nothing in lithium's code that explains this observation to me. I will try to reproduce it
I had a similar problem, it turned out that a bunch of foxes during a thunderstorm for some reason took 10-20 mspt, I don't know if that helps, but yeah