CyclopsMC / IntegratedDynamics

A Minecraft mod to take full and automated control of your appliances.
http://cyclopsmc.github.io/IntegratedDynamics/
MIT License
126 stars 59 forks source link

Mod-Induced TPS Lag on Server #1319

Closed grahamfoxrollup closed 5 months ago

grahamfoxrollup commented 6 months ago

Issue type:


Short description:

The profiler indicates that a large portion of the server's resources are being consumed by tasks related to block state management. This is leading to a significant slowdown in-game performance, affecting the overall player experience. It seems that the mod's operations on block states are quite intensive, causing the server to struggle with maintaining smooth gameplay.

I believe this issue might be due to the mod's intensive processing demands, which are overwhelming the server's capacity to handle block management efficiently. I hope this information helps in identifying and resolving the performance issue.

Steps to reproduce the problem:

I am unable to provide exact steps to reproduce this issue as it seems to occur under regular gameplay conditions without a specific set of actions. However, to assist in diagnosing and resolving this problem, I can provide the server save file. This file should offer a real-world context of the mod's performance impact on the server.


Versions:

Profiler output:

https://spark.lucko.me/Kl4PeAjh3s image

rubensworks commented 6 months ago

Thanks for reporting!

rubensworks commented 6 months ago

It might be just one (or several) parts leading to excessive tick times. Could you check the network diagnostics using /integrateddynamics networkdiagnostics? That should help us to identify which operations cause performance issues.

SplenectomY commented 6 months ago

I'm having similar issues with ID on my server and would love to help contribute. I've run /integrateddynamics networkdiagnostics ... does this print a report somewhere?

grahamfoxrollup commented 6 months ago

/integrateddynamics networkdiagnostics

getting an unknown command when attempting to use this. does safemode need to be enabled?

rubensworks commented 6 months ago

getting an unknown command when attempting to use this. does safemode need to be enabled?

You must be operator on the server in order to use this command.

After that, the chat will show you a hyperlink on which you can click to view the diagnostics in a web browser window.

grahamfoxrollup commented 5 months ago

getting an unknown command when attempting to use this. does safemode need to be enabled?

You must be operator on the server in order to use this command.

After that, the chat will show you a hyperlink on which you can click to view the diagnostics in a web browser window.

image

that command isn't recognized regardless of permissions

rubensworks commented 5 months ago

You need to use the command as a player, not in the server console.

grahamfoxrollup commented 5 months ago

You need to use the command as a player, not in the server console.

with all do respect, I understand how to do this and I did and that isn't even true.

image

what permissions does integrated dynamics need?

rubensworks commented 5 months ago

Hmm, that's weird. You should only require op-permissions: https://github.com/CyclopsMC/IntegratedDynamics/blob/master-1.20/src/main/java/org/cyclops/integrateddynamics/command/CommandNetworkDiagnostics.java#L42-L48

Can you access any of the other /integrateddynamics commands? (e.g. via auto-complete)

stripwire commented 2 months ago

I have same issue. And yay, i found the source of overload! Overload was caused by the crafter looking for craft items.

Without cards that request crafting, server has stopped printing overload messages, but spark still informs about high load caused by integrated dynamics. Thanks for /integrateddynamics networkdiagnostics

And i don't understand why that not caused CPU load, but just caused low TPS? May be this related to high memory usage rate?

screenshots
rubensworks commented 2 months ago

@stripwire Thanks for your findings. Could you create a separate issue for it at https://github.com/CyclopsMC/IntegratedCrafting/ ?

GitHub
GitHub - CyclopsMC/IntegratedCrafting: Craft stuff in Integrated Dynamics networks
Craft stuff in Integrated Dynamics networks. Contribute to CyclopsMC/IntegratedCrafting development by creating an account on GitHub.
stripwire commented 2 months ago

@rubensworks Oh.. Yesterday that bug was repeats at afternoon, but stopped repeat at evening. Does it make sense to create issue, if i can't repeat that bug now?

rubensworks commented 2 months ago

@stripwire If it occurs again in the future, perhaps you can create an issue then.