Ender IO Conduit Performance is Slow
Opened this issue ยท 10 comments
Issue Description:
Under Enigmatica 2 Expert. I spoke with Niller about this (bug here: EnigmaticaModpacks/Enigmatica2Expert#1190) and we found it is unlikely to be related to E2E or any mod pack. It appears that Ender Conduits are individually slow.
Version: EnderIO 5.0.44
What happens:
Ticks per second linearly degrades as more conduits are added. You can see this with the profiling tools available in Minecraft:
What you expected to happen:
Performance requirements for a conduit should not be this high, per conduit.
Steps to reproduce:
- Create conduits.
- Measure "debug start" profiling every 100 conduits.
- Map TPS over time.
Affected Versions (Do not use "latest"):
- EnderIO: 5.0.44
- EnderCore: 5.57
- Minecraft: 1.12.2
- Forge: 14.23.5.2831
Your most recent log file where the issue was present:
https://pastebin.com/ejRagWAi
Example shots of usage: https://filedn.com/lD47MkPDxpzLREeay928LHm/Debugging/
Example counts of conduits when problem becomes untenable (70% cpu time spent on conduits):
enderio:block_conduit_bundle, meta 0, 637
enderio:block_conduit_bundle, meta 1, 405
Please run the vanilla profiler for a couple of minutes and attach the profiling log.
That's the pastebin, above. Or are you asking me to create a new world with only EnderIO and graph the conduit to TPS?
Edit: I see, a couple of minutes. Will do.
Here's the profiler after 6.7 minutes:
I expected a logfile there, so I didn't even click the link. You're the first person to even know the vanilla profiler...
Ok, that time is spent in updateNetwork/updateConnections. Those run together whenever a conduit is added or removed to a network of conduits. (updateConnections also has other triggers, but seeing that it has about the same runtime as updateNetwork, I don't think those come into play here).
As I don't think you have a block breaker and block placer combo to do this, the most likely reason would be a chunk that is being loaded and unloaded each tick. While Ender IO knows how to handle a conduit network that is partially in loaded and partially in unloaded chunks, there is no way of protecting against a "flickering" chunk in there---the conduits in that chunk just don't know that they are in one.
Please check if that is the cause of your slowdowns. I think there are mods out there to diagnose chunk flickering.
Thanks Henry, that's useful analysis. I'll look into flinkering chunks and get back to you. Might take a day or two, if you don't mind keeping this issue open.
I don't know what's a normal rate for chunk loading. I'm at work so can't spawn into the world to look at specific chunks, but here is chunk load activity over 2000 ticks:
I think we're onto something here. Chunk [ 0, 21]
is definitely flickering.
17.05 12:28:43 [Server] Server thread/INFO [tellme]: Chunk Load ; DIM: -1, Tick: 195698178, Time: 1558110523986, ChunkPos: [ 0, 21]
17.05 12:28:44 [Server] Server thread/INFO [tellme]: Chunk Unload ; DIM: -1, Tick: 195698179, Time: 1558110524036, ChunkPos: [ 0, 21]
17.05 12:28:47 [Server] Server thread/INFO [tellme]: Chunk Load ; DIM: -1, Tick: 195698254, Time: 1558110527779, ChunkPos: [ 0, 21]
17.05 12:28:47 [Server] Server thread/INFO [tellme]: Chunk Unload ; DIM: -1, Tick: 195698255, Time: 1558110527834, ChunkPos: [ 0, 21]
17.05 12:29:59 [Server] Server thread/INFO [tellme]: Chunk Load ; DIM: -1, Tick: 195699680, Time: 1558110599117, ChunkPos: [ 0, 21]
17.05 12:29:59 [Server] Server thread/INFO [tellme]: Chunk Unload ; DIM: -1, Tick: 195699681, Time: 1558110599155, ChunkPos: [ 0, 21]
17.05 12:30:11 [Server] Server thread/INFO [tellme]: Chunk Load ; DIM: -1, Tick: 195699914, Time: 1558110611007, ChunkPos: [ 0, 21]
17.05 12:30:11 [Server] Server thread/INFO [tellme]: Chunk Unload ; DIM: -1, Tick: 195699915, Time: 1558110611036, ChunkPos: [ 0, 21]
17.05 12:30:17 [Server] Server thread/INFO [tellme]: Chunk Load ; DIM: -1, Tick: 195700055, Time: 1558110617841, ChunkPos: [ 0, 21]
17.05 12:30:17 [Server] Server thread/INFO [tellme]: Chunk Unload ; DIM: -1, Tick: 195700056, Time: 1558110617878, ChunkPos: [ 0, 21]
You see how it is loaded and directly unloaded the very next tick?
I didn't compare the timestamps, but it looks to be the same for those chunks, too: [ -1, 19] [ -1, 21] [ -2, 19] [ -2, 20] [ -3, 19] [ -3, 20] [ -4, 20] [ -5, 20] [ -7, 28] [ -12, 19] [ -12, 20] [ -12, 21] [ -12, 22] [ -13, 3] [ -13, 4] [ -13, 5] [ -13, 6] [ -13, 7] [ -13, 8] [ -13, 9] [ -13, 10] [ -13, 18] [ -13, 19] [ -13, 20] [ -13, 21] [ -13, 22] [ -14, 3] [ -14, 4] [ -14, 5] [ -14, 6] [ -14, 7] [ -14, 8] [ -14, 9] [ -14, 10] [ -15, 3] [ -15, 4] [ -15, 5] [ -15, 6] [ -15, 7] [ -15, 8] [ -15, 9] [ -15, 10] [ -15, 11] [ -15, 12] [ -15, 13] [ -15, 14] [ -15, 15] [ -15, 16] [ -16, 13] [ -16, 14] [ -16, 15] [ -16, 16]
My recommendation would be to put down a chunk loader. That's usually much easier than trying to keep chunks unloaded.
The target is to get the the occurrence of "chunk loaded in tick x and unloaded in tick x+1" to a minimum---there's no way of preventing it completely---and the the number of chunks that do that all the time to near zero.
PS: I just noticed I picked the one Nether (dim -1) chunk as an example. The others are overworld (dim 0). Doesn't change anything about what I said before. But...the nether (the whole dimension) should not be loaded unless it's chunkloaded or a player is in there. So you may also have a dimension-flickering issue. Do you have a mob-grinder that pushes its drops into a nether portal?
I don't have anything intentionally pushing things into a nether portal, but this gives me a bunch to investigate. I'm at work now, so I can't travel to those chunks right now and look around. I'll definitely track this down tonight. I do think this is looking like the cause of the performance issues and it shouldn't be hard to figure out why these chunks are malfunctioning.
I couldn't figure out the problem. I migrated the server to an i9. Solve it with compute!