Nature's Aura

Nature's Aura

30M Downloads

Lag Spikes - Server Profile Data Included

xkobalx opened this issue ยท 2 comments

commented

Narrowed down an issue that was causing massive lag spikes on my customer modpack server to this mod.

Specifically this-

de.ellpeck.naturesaura.chunk.AuraChunk.update() - 42.98%

The percentage indicates the share of all thread processes that were being used by this over the course of the test.

A rough breakdown of everything else:
~37% then was used for the thread wait or sleep function
and the remainder ~21% covered everything from MC and the other 180 or so mods on the server.

Complete test profile is here- https://spark.lucko.me/m2JzIIitRl

Removing just this mod lowered tps from median of 65ms to 7.8ms and maximum tps from 2250ms to 20.1.

Some factors that likely contributed. Aura generation was automated in a few places. In several different ways. About 80 chunks in a relatively close area were force loaded. There were 2 automated single level farms each about 15x15 blocks in size and 3 animal pens inside another chunk where bred animals were being processed through automation as well. The farms were all taking advantage of the Aura effects to speed up growth and automate breeding. Lag spikes were most evident near the farms. Server lag effected everyone but client lag near the farms was quite a bit worse.

Aura was over max in a large area about 20x20 chunks and tapered off from there.

There were no errors in the log or in the debug log. No crashes. The hardware on the server and my machine are both extremely excessive for even heavily modded minecraft.

I hope this information is of use. We have enjoyed your mod and the unique mechanics in it. Hoping it can be further optimized so we can include it on our server again in the future.

Thank you for your time and an otherwise great mod.

Kind regards.

commented

Actually, please try to do another profile with this version if you can <3

commented

If you're automating aura production and you chunk load it, you should really put a limit on the amount that gets created.

There's a little bit of optimization to be done here (specifically replacing PlantBoostEffect's nextGaussian with nextFloat in the hopes that that performs a little better), but if you have an overly massive amount of Aura in an area, there's bound to be some lag caused by it. After all, all of that aura has to spread, balance and cause nearby plants to grow. This isn't so much an optimization issue as it is an "there is only a limited amount of time in a second" issue.

What version are you on?

Also, it would be great if you could do some additional profiling with the vanilla profiler which Nature's Aura heavily integrates with. Thanks!