Applied Energistics 2

Applied Energistics 2

156M Downloads

Multiple channels cause EXTREME lag in multiplayer and single player worlds.

MrTrilB opened this issue ยท 10 comments

commented

Describe the bug

For some reason when multiple channels are in use in an AE system, the entire area to which your system is housed lags uncontrollably to the point it took me 10 minuets to get through a door.
To Reproduce

Create a minimum of 12 p2p channel configs.
Expected behavior

Not to lag.
Additional context

Environment

  • Minecraft Version: 1.12.2
  • AE2 Version: appliedenergistics2-rv6-stable-7.jar
  • Forge Version:14.23.5.2852
commented

Is it in singleplayer or multiplayer ? As I tried a config with a lot of Channels passing by P2P without experiencing any lag
2020-04-26_11 21 04

commented

Can confirm that when providing 160AE/t on the required 256AE/t, the system connect deconnect, again and again causing some struggle in performance.
A big part of the struggle on the configuration shown is the reupdate + Light recalculation as ME Controller emit lights when on

commented

Do you have enough internal ME System Energy capacity?
AKA: have you added AT LEAST 1 Energy Cell? When the internal energy capacity of the ME System is not enough, you will run into energy bottenecking, causing the entire ME System to be reloaded non-stop causing severe lag. This can be, as already said, fixed by adding enough internal energy storage by adding Energy Cells.

To check if you ME System is bottlenecking:

  • Take a network tool
  • use it on your me system.
  • If current Energy level is 0, or often reaching 0, OR most of the time below 50% of capacity, you should add more Energy Cells.
commented

without experiencing any lag (by picture)

There is an creative energy cell in your so setup, attach one in your mp world and see if it fixes your issue. Most probably like pingger said

commented

@yueh the hint about light updates sounds interesting, the toggle of emmision could possibly be delayed (dont know if you are working on some other solution for bootloops)

But i will close the issue due to being only an power issues

commented

Controllers light up once they are online/powered. Which will of course cause a lighting update. These are always a bit costly, but nothing we can solve.

Delaying does not offer any solution for it. It just moves some threshold around. E.g. it now only has a major impact when supplied say 25% of the power required instead of 50%. At some point it will always exist.

One potential idea would be to dynamically scale the boottime for a network. Say if it shuts down in less time than it takes to boot, double the boottime and repeat. Downside is this will scale extremely fast and suddenly networks will not turn on for 1243 days (realtime)

commented

AbstractPartReporting.java
return this.blockLight( this.isPowered() ? ( this.isLightSource() ? 15 : 9 ) : 0 );

can't you simply drop a timer around that to delay changes a few ticks ? as a most simple patch?

commented

Thank you so much. One question, how do I calculate the required power and I am guessing it has to be via multiple sources?

commented

you can not "calculate" the power demand like with normal machines, as you have static demand + VERY dynamic demand when moving items (by hand via interface, bus or other means) or crafting stuff

a good rule of thumbs is like pingger said, check the network capacity and if it dips below 50% regulary, just attach some more AE2 energy cells

commented

With the network tool you can get the maximum consumption capacity (and current charge) of your AE2 network, it doesn't mean that your production should be always producing at this point but that if everything is used your network will consume that much.