[1.20.1 Forge] Quarry lag in unloaded chunks
Kotori316 opened this issue · 5 comments
From discord
My Quarrys (that are 8k blocks away and loaded with chunkloader) are causing massive TPS/Tick Lag.
And i do not know why, or how i can fix it.
No other mod is causing that much Tick - Lag
(Screenshot show´s sparks profiler and the source of the lag)
Hardware is not the problem. Server running on 8GB Ram and only using 3GB
(Forge ,1.20.1)
I know for sure that in earlier versions running 10+ Quarries at the same time/setup i had no lags and even were able to host a server with them running.
Checks
- The search logic
- Something related to the stacktrace
Can confirm, this is a problem on 1.20.1 and my own personal modpack on 1.18.2
Experiencing the same thing. Seems that the quarryplus runs just fine when the chunks being quarried are within the players viewing distance. As soon as you go beyond that, the server experiences a tick spike and at times crashes the server.
Running 1.18.2
java.lang.Error: ServerHangWatchdog detected that a single server tick took 600.00 seconds (should be max 0.05) at jdk.internal.misc.Unsafe.park(Native Method) ~[?:?] {} at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252) ~[?:?] {re:mixin} at net.minecraft.util.thread.BlockableEventLoop.m_5667_(BlockableEventLoop.java:152) ~[server-1.18.2-20220404.173914-srg.jar%23154!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B} at net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:142) ~[server-1.18.2-20220404.173914-srg.jar%23154!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B} at net.minecraft.server.level.ServerChunkCache.m_7587_(ServerChunkCacheMixin.java:129) ~[server-1.18.2-20220404.173914-srg.jar%23154!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.arclight.core.json:server.level.ServerChunkCacheMixin,pl:mixin:APP:chunkpregen.mixins.json:common.storage.ServerChunkProviderMixin,pl:mixin:APP:immersive_melodies.mixin.json:ServerChunkManagerMixin,pl:mixin:A,re:mixin,pl:accesstransformer:B} at net.minecraft.world.level.Level.m_6522_(LevelMixin.java:169) ~[server-1.18.2-20220404.173914-srg.jar%23154!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.arclight.core.json:world.level.LevelMixin,pl:mixin:APP:sliceanddice.mixins.json:LevelMixin,pl:mixin:A,re:mixin,pl:accesstransformer:B} at net.minecraft.world.level.LevelReader.m_46819_(LevelReader.java:123) ~[server-1.18.2-20220404.173914-srg.jar%23154!/:?] {re:mixin,re:classloading,re:mixin} at net.minecraft.world.level.Level.m_6325_(LevelMixin.java:164) ~[server-1.18.2-20220404.173914-srg.jar%23154!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.arclight.core.json:world.level.LevelMixin,pl:mixin:APP:sliceanddice.mixins.json:LevelMixin,pl:mixin:A,re:mixin,pl:accesstransformer:B} at net.minecraft.world.level.Level.m_46745_(LevelMixin.java:160) ~[server-1.18.2-20220404.173914-srg.jar%23154!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.arclight.core.json:world.level.LevelMixin,pl:mixin:APP:sliceanddice.mixins.json:LevelMixin,pl:mixin:A,re:mixin,pl:accesstransformer:B} at net.minecraft.world.level.Level.m_6425_(LevelMixin.java:399) ~[server-1.18.2-20220404.173914-srg.jar%23154!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.arclight.core.json:world.level.LevelMixin,pl:mixin:APP:sliceanddice.mixins.json:LevelMixin,pl:mixin:A,re:mixin,pl:accesstransformer:B} at com.yogpc.qp.machines.advquarry.TileAdvQuarry.removeFluidAtXZ(TileAdvQuarry.java:449) ~[AdditionalEnchantedMiner-1.18.2-18.23.jar%2371!/:18.23] {re:classloading} at com.yogpc.qp.machines.advquarry.TileAdvQuarry.removeEdgeFluid(TileAdvQuarry.java:420) ~[AdditionalEnchantedMiner-1.18.2-18.23.jar%2371!/:18.23] {re:classloading} at com.yogpc.qp.machines.advquarry.TileAdvQuarry.breakBlocks(TileAdvQuarry.java:345) ~[AdditionalEnchantedMiner-1.18.2-18.23.jar%2371!/:18.23] {re:classloading} at com.yogpc.qp.machines.advquarry.AdvQuarryAction$BreakBlock.tick(AdvQuarryAction.java:279) ~[AdditionalEnchantedMiner-1.18.2-18.23.jar%2371!/:18.23] {re:classloading} at com.yogpc.qp.machines.advquarry.TileAdvQuarry.tick(TileAdvQuarry.java:92) ~[AdditionalEnchantedMiner-1.18.2-18.23.jar%2371!/:18.23] {re:classloading} at com.yogpc.qp.machines.advquarry.BlockAdvQuarry$$Lambda$27458/0x00007fc1ef670460.m_155252_(Unknown Source) ~[?:?] {} at com.yogpc.qp.utils.CombinedBlockEntityTicker.m_155252_(CombinedBlockEntityTicker.java:23) ~[AdditionalEnchantedMiner-1.18.2-18.23.jar%2371!/:18.23] {re:classloading} at net.minecraft.world.level.chunk.LevelChunk$BoundTickingBlockEntity.m_142224_(LevelChunk_BoundTickingBlockEntityMixin.java:673) ~[server-1.18.2-20220404.173914-srg.jar%23154!/:?] {re:mixin,re:classloading,pl:mixin:APP:mixins.arclight.core.json:world.level.chunk.LevelChunk_BoundTickingBlockEntityMixin,pl:mixin:A}
It might be problem that accessing blocks in unloaded chunks. Then, I should remove chunk loading function or remove block check functions such as removing fluids.
NGL - As the server owner, I would prefer to have a setting that does not allow the user to mine outside their viewing distance, or a hard setting that says something along the lines of cannot exceed 6 x 6 chunks. I want players to have to work at their quarry, not just go drop a quarryplus and set it to a 50 x 50. :)