Conflict between Digital Miner and Reliquary Lantern of Paranoia
rwdj opened this issue ยท 4 comments
Issue description:
Major and predictable lag-spike and occasional crash as a result of interaction between Mekanism's Digital Miner and Reliquary's Lantern of Paranoia.
I plan to cross-post this since I don't know which mod is at fault, or if there's even anything that can be done.
I presume this issue is more on Reliquary's end, but since I'm not familiar with the code of either, I'm cross-posting.
If a player with a lantern of paranoia on walks close (~3 blocks normal to the miner) to a mekanism digital miner, some kind of interaction between the two causes massive and predictable server-side lag. In extreme cases, this has caused the server to crash. Was able to reproduce on a blank world on the same server (16 Core 4.0 GHz) with only mekanism mods and reliquary loaded. Was not able to reproduce reliably on a desktop (22 Core 4.3 GHz).
Steps to reproduce:
- Start a minecraft server (? was unable to reproduce on a stronger desktop)
- Stand on a digital miner (configured to 8 radius and 0-256 with mine forge:ores)
- I placed a bunch of advanced solar generators. I think this is irrelevant.
- Turn on Lantern of Paranoia
- Observe latest.log or server thread CPU usage.
Version (make sure you are on the latest version before reporting):
Forge: 1.16.4-35.1.0
Mekanism: 1.16.4-10.0.17.444
Other relevant version:
reliquary-1.16.3-1.3.4.1061.jar
Full mod list:
Minecraft 1.16.4
Mekanism-1.16.4-10.0.17.444.jar
forge-1.16.4-35.1.0-universal.jar
MekanismTools-1.16.4-10.0.17.444.jar
MekanismGenerators-1.16.4-10.0.17.444.jar
reliquary-1.16.3-1.3.4.1061.jar
If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)
This is the result of me walking towards and away from the digital miner and eventually I start tinkering with the lantern and notice the lantern's on-state is why.
[30Nov2020 00:20:11.439] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 2208ms or 44 ticks behind
[30Nov2020 00:20:53.060] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 2029ms or 40 ticks behind
[30Nov2020 00:22:08.885] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 2004ms or 40 ticks behind
[30Nov2020 00:22:28.607] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 4726ms or 94 ticks behind
[30Nov2020 00:22:48.315] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 4734ms or 94 ticks behind
[30Nov2020 00:23:07.962] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 4681ms or 93 ticks behind
[30Nov2020 00:23:31.111] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 8180ms or 163 ticks behind
[30Nov2020 00:24:07.469] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 2038ms or 40 ticks behind
[30Nov2020 00:24:49.184] [Server thread/WARN] [net.minecraft.server.MinecraftServer/]: Can't keep up! Is the server overloaded? Running 26753ms or 535 ticks behind
I do not have a crash-log on hand, as I need a second player and some bad luck to cause it, and they're not online at the time of this posting.
Got a chance to look into this a little, and I believe there is not much we can do on our end about this. It seems every tick the lantern of paranoia is trying to place torches against a ton of different blocks which is likely to cause lag in general. Pair that with the fact that the bounding blocks we use for the digital miner and advanced solar generators mark state caching (for things like torch placement) as false so that they can actually have them placed at times it causes the performance to be very subpar. My suggestion is if they insist on doing it every tick (instead of say every few ticks which they may want to consider anyways), they should probably add a check for block#isVariableOpacity
to this line, so that it doesn't try to place it in as insane a manner against blocks that their shape can't be fully cached.
What is the function of the Lantern of Paranoia (I haven't really used reliquary much)?