Mekanism Generators

Mekanism Generators

97M Downloads

Stress-tested heat gens, sort of, massive lag has ensued (1.20.1, Ozone SkyBlock Reborn pack) (Meka 10.4.6/.8)

Trisscar05 opened this issue ยท 17 comments

commented

Issue description

I made an about 140x140 1 y level area of passive heat generators, as surrounded by lava as is possible while still being able to draw energy, in a 4 leaf clover pattern that I then tessellated. Something on the order of thousands of heat gens.

With nothing else being simulated to cause large amounts of lag, and with a fairly powerful PC running Ubuntu, my single player world is consistently running hundreds or thousands of ticks behind, to the point that nearby animals (flying bats in this case) are animated but frozen in place for minutes at a time.

Yes I realize this is a nonsense scenario with the thousands of gens, but I'd argue that I have a larger area of 1 y level farms complete with harvesters, vacuum chests, and MysAg growth crystals, which produces nowhere near as much lag (and is not loaded while I'm doing this btw).

Mostly curious if this amount of lag is expected, and if heat gens are doing something like constantly checking their surroundings for heat sources or something, and if so if that can be toned down in any capacity?

Going to try updating things on my end to see if that helps. *Edit: did not seem to help.

Steps to reproduce

No response

Minecraft version

1.20.1 or earlier (No longer being developed)

NeoForge version

47.2.32

Mekanism version

Older

Other relevant versions

No response

If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)

https://paste.atlauncher.com/view/4c9a5cbe-dc32-4987-a333-15ec1fea6c7c

commented

In process now of putting ultimate cables in the places where the nitro cables used to be. That log and sampler were with just about all nitro cables gone, barring maybe ten in various places that were hard to get to.

commented

Okay here's the result of putting all ultimate cables in instead. Raised the "behind" count to about 150 on average, still way better than the Powah cables.
2024-06-12_18 04 23
ATLauncher3.zip
https://paste.atlauncher.com/view/29e9e96e-76c7-4a19-b402-c9dab5c2d20b

commented

Heeeeehhhh so that was interesting. Spark was added successfully, but attempting to start a profiler results in the system claiming that one is already running (despite using the INFO command to check that there was not in fact one running).

https://paste.atlauncher.com/view/a09d0f51-bf26-460e-8c07-b0b74ad46d66

Working on VisualVm now.

commented

image
Is this what you were needing? Btw the server (or world really) had a few "100k+ ticks behind" messages during this.

commented

Could you provide a visualvm or spark profile of it? Leave it running for at least a minute.

We did do a number of performance improvements in 1.20.2, but these are quite unlikely to be back ported at this stage given we're focused on 1.21

commented

I shall attempt it, though this pack has crashed everything before, so well see.

commented

Github says it doesn't support the .nps filetype, how would you like me to give it to you?

commented

Oh, whoops, Visualvm calls it Sampler (cpu). But same deal really, let it run for a bit, hit the snapshot button and save the resulting nps file

commented

Oof, welp to the lag mines I go.

commented

Zip it up and it'll work

commented

ATLauncher.zip

'Ow's that?

commented

nothing exiting there, time is just taken up distributing power.

You could try switching from Powah cables to Mekanism so there are less conversions between energy types, but it might not help.
We do have plans to remove the FloatingLong class which is a large part of the conversions (again, not in your mc version, sadly)

commented

Fair enough, shall try that. Is there any config option I can toggle or change to force the heat gens (or anything else involved) to slow down in the meantime, so that I can go in and change out the cables?

commented

I don't believe so

commented

ATLauncher2.zip
Aight so removing the vast majority if not all of the Powah cables took the server tick lag from 100k to a bit less than 100 on average, which is astounding to me, good call.

The new sampler is attached in case you were curious what my build's timing looks like without the cables, in case the original one wasn't specific enough to show that or something.

https://paste.atlauncher.com/view/a13da352-6e75-4aaf-b509-9ffb45ef7d8a
log as well, included one relaunch of the world (but not MC) to make sure that most of any memory shenanigans were cleared.

Time to try with Meka cables.

commented

Did you replace the cables with something? otherwise the generators won't have anywhere to send their energy and will stop producing ๐Ÿ˜…

commented

Shall close unless something else comes up, so far all seems normal. Thanks much for the help!