NuclearCraft

NuclearCraft

31M Downloads

Electrolysers causing TPS lag on server

GameBurrow opened this issue · 17 comments

commented

Several Electrolysers were causing TPS drop of 10 on our server, even when unpowered.

Forge version 14.23.5.2796
Nuclearcraft version 2.12k
Used modpack (v5.0.10.0): https://minecraft.curseforge.com/projects/the-society-transportcraft/files

Here is our tickprofiler result:
Server profiler result

Here is the setup in question:

Full chat log with the players who built the setup

[Server] Is anybody using Electrolyser
[Lilu_Paine] no
[Piston_man20] we have them but not on
[Piston_man20] no power
GameBurrowToday at 10:09
Remove them.
TheSocietyBOTToday at 10:09
[Piston_man20] what's up?w
GameBurrowToday at 10:09
They are causing huge lags.
TheSocietyBOTToday at 10:14
[Piston_man20] thats odd considerint that they arent even powered
TheSocietyBOTToday at 10:15
[dominator2486] they are unpowered
[Lilu_Paine] maybe someone else has them and they arent online
[Lilu_Paine] ?
[dominator2486] might be on to something in science
GameBurrowToday at 10:16
Look at the coordinates, they match the base location. They may be unpowered but they are lagging, can you guys send me screenshots of the setup.
TheSocietyBOTToday at 10:16
[Piston_man20] try now, i cleared thier water tanks
[dominator2486] they are giving particles when there is water, even if there is no power
GameBurrowToday at 10:17
Running profiler.
TheSocietyBOTToday at 10:17
[dominator2486] josh draining them now
[Piston_man20] done
[dominator2486] your profiler is wrong
[dominator2486] not showing all the electro
GameBurrowToday at 10:18
Now it's okay, did 3 tests in a row.
It showed the top 5 users.
JoshGToday at 10:18
gotcha
GameBurrowToday at 10:19
I'll make a bug report on their github because it almost crashed the server.

commented

Hmm... I'm really not able to recreate this - I've set up 50 inactive electrolysers in my test world and they are taking a total of 1 microsecond to tick. What are the units of tick time used by that profiler?

commented

Good question, this is the mod I used for profiling as I didn't have access to client at the time.
https://minecraft.curseforge.com/projects/tickprofiler

What I do know is that server TPS was around 7 before draining the Electrolysers and after that it was around 16.

commented

Comparing values with LagGoggles, it looks like it uses same units:
μs/t

commented

Are you able to recreate this in another world, client or server?

commented

@kerts93 Still having trouble recreating this with your pack or various other combinations of mods. I've updated the mod recently (2.13d is now the latest) with a bunch of bug fixes and a few performance improvements here and there - maybe give that a try?

commented

Sorry for not replying, haven't had a chance to try outside of our world or server, but the issue is still there:

I will try your update soon to see if that fixes/improves things and will let you know.

commented

So they're not being supplied power at all? If so, they shouldn't turn on in the first place.

commented

I turned them all off and I noticed no power coming into them at all (all stayed at 0RF)

commented

And they were still flickering?

commented

They were flickering yes until I turned them manually off with redstone.

commented

Ohhhh... I may have found the cause. Let me put together a quick build, and I'll post it here shortly :)

commented

@kerts93 Give this a go - it may fix the problem...

commented

Looks like that indeed fixes the issue. (Temporarerly added it to the server and my own client to test it)

commented

Awesome - okay, I'll get a proper update with some other improvements out soon :)

commented

After the last update it's the same:
image

But I think I fiqured something out thanks to JEI, their states flicker from active to idle and this is something we have seen that can cause tps lag from other mods also. See gif below:

image

commented

I don't see a gif, but if the block is flickering, then yes, that will probably be the cause - are they being supplied enough power? Are they processing the water very quickly?

commented

No power at all yes, I leave a not to them but is there a way to check this on the mod side, for example some kind of minimum amount it needs to have before it turns on or something like that? (Sorry I'm not the brightest on modding side)