Applied Energistics 2

Applied Energistics 2

137M Downloads

40% ae2 usage crazy bad performance

funnycubeguy opened this issue ยท 19 comments

commented

How to reproduce the performance issue

I have a world with 4 of the same bases. If I remove the gregtech layer of these bases ae2 drops down to around 3%.

There are no addons just ae2 from the all the mods 9 pack. I have configured my ae2 config to raise ticks of everything with no luck. There seems to be a bug somewhere. I can reproduce on multiple servers with bases similar to this one

Here is the current config: https://pastes.dev/hp49gcOnCH

Same performance with default config

Spark profile link

https://spark.lucko.me/hw0W9EgrHO

Which minecraft version are you using?

1.20

On which mod loaders does it happen?

Forge

Additional details

No response

commented

if I am reading that correctly, 39% of tick time is spend on ae2 iterating over every devices that can tick, without even doing any work (your tick rate settings might are basically equivalent to never tick).
(the other 2% ae2 is taking seems somewhat normal)

do you know roughly how many devices you have in the networks?

commented

@funnycubeguy Please run /give @s ae2:debug_card and shift+click while holding it in hand

Please report the results, which should look a bit like this: image

thanks I have since then removed the 3 copies of the base to avoid any conflicts with p2p or other things. so this is just the 1 base on a fresh server with addons enabled default atm9 pack install.

I can remove all addons if you want. i have used the same config above with all ticks set to

image

Here is a spark profile with just the single base: https://spark.lucko.me/JQNlHRyRqx
it will eventually reach 15% over time the longer it runs.

the actual server has a few bases like this which causes ae2 to reach 22 - 40% usage, but this base I can repeat the issue easily and 10% is crazy for just 1 base.

image

thanks for the help. i have this on a test server if anyone wants to see the base

commented

@funnycubeguy Please run /give @s ae2:debug_card and shift+click while holding it in hand

Please report the results, which should look a bit like this:
image

commented

I want to add I've removed the top 2 out of 4 layers of gregtech on this base. This is the spark profile: https://spark.lucko.me/QMz7gfJhk1

Then removing the last 2 layers of gregtech on this base: https://spark.lucko.me/GhmCSMmMOD

It'll slowly go up and down around 3% usage at this point.

There is 1 final layer of machines (mostly mek) when that is removed we hit 2% ae2 usage. :https://spark.lucko.me/00fkynXdyf

There are many layers below but it is ae2 crafters, the p2p main network, assemblers, drives ect other things below removing those doesn't do much.

If you want me to copy the base again to 4 bases I can do so, but it's the same result as this just multiplied by 4.

commented

I thought it would be interesting to restore the base back to default and remove all pattern providers connecting to the machines, but it seemed to do nothing even though everything looks broken

https://spark.lucko.me/BAunGTswUr 13% usage

Removing the cables connecting to storage buses / exporters/importers also does nothing? At this point the network looks pretty busted

commented

Removing all ae2:cable_bus from the gregtech layers seems to work: https://spark.lucko.me/jGHwBgwCXA

(cable + all buses).

commented

You'll have to provide a world-save download for the case where it is the worst and provide a link to the modpack, otherwise this is impossible to debug.

commented

You'll have to provide a world-save download for the case where it is the worst and provide a link to the modpack, otherwise this is impossible to debug.

Modpack link: https://www.curseforge.com/minecraft/modpacks/all-the-mods-9

I have a schematic of the base and a world download. The pack already includes spark. There is a white elevator in the bottom left corner which will take you down to the ae2 setup.
ok.zip

commented

@funnycubeguy Can you please try to repro your original problem (with the super high tick times) using this experimental version?

https://github.com/AppliedEnergistics/Applied-Energistics-2/actions/runs/9294092791/artifacts/1550381558

(This reduced per-tick-% for AE2 from 10%->~3% using your test world)

commented

@funnycubeguy Can you please try to repro your original problem (with the super high tick times) using this experimental version?

https://github.com/AppliedEnergistics/Applied-Energistics-2/actions/runs/9294092791/artifacts/1550381558

(This reduced per-tick-% for AE2 from 10%->~3% using your test world)

Thank you so much I have been watching the dev channel. I will test this out and report back

commented

@funnycubeguy You should let me know who you are on Discord, sending the jar on discord is easier :-P

commented

@funnycubeguy You should let me know who you are on Discord, sending the jar on discord is easier :-P

Discord: netmail

commented

After a lot of testing this worked amazing! With just the single base I provided you guys it brought the usage from 10% down to 1.5%.

I then copied the base 4 more times with an extra base that was already in the world netting around a 13% - 20% overall.

Heres a few spark profiles with the 5 bases.

https://spark.lucko.me/OMek9JJqYS
https://spark.lucko.me/cHjI6vi3wT
https://spark.lucko.me/xk30Bp7mCf

I am overall super happy with the results thanks so much

I should note I saw as much as 56% usage before this patch with 4 of these bases.

commented

After a lot of testing this worked amazing! With just the single base I provided you guys it brought the usage from 10% down to 1.5%.

I then copied the base 4 more times with an extra base that was already in the world netting around a 13% - 20% overall.

Heres a few spark profiles with the 5 bases.

https://spark.lucko.me/OMek9JJqYS https://spark.lucko.me/cHjI6vi3wT https://spark.lucko.me/xk30Bp7mCf

I am overall super happy with the results thanks so much

I should note I saw as much as 56% usage before this patch with 4 of these bases.

Thank you! Can you tell me how you do these base copies? I'd like to have that world with 5 bases :)

commented

After a lot of testing this worked amazing! With just the single base I provided you guys it brought the usage from 10% down to 1.5%.
I then copied the base 4 more times with an extra base that was already in the world netting around a 13% - 20% overall.
Heres a few spark profiles with the 5 bases.
https://spark.lucko.me/OMek9JJqYS https://spark.lucko.me/cHjI6vi3wT https://spark.lucko.me/xk30Bp7mCf
I am overall super happy with the results thanks so much
I should note I saw as much as 56% usage before this patch with 4 of these bases.

Thank you! Can you tell me how you do these base copies? I'd like to have that world with 5 bases :)

I use the world edit mod. It looks like there is 6 but that's due to the build being too large to copy.

Here is the world it was too large to upload on git:
https://filebin.net/pro3zmqb3dh6tq7m

commented

@funnycubeguy Would it be okay for you if I closed this issue for now, or is it still unplayable for you with the latest changes?
I'll keep working on optimizations based on your use-case, but probably on the 1.21 branch ๐Ÿค”

commented

@funnycubeguy Would it be okay for you if I closed this issue for now, or is it still unplayable for you with the latest changes? I'll keep working on optimizations based on your use-case, but probably on the 1.21 branch ๐Ÿค”

Thanks I have tested it on live servers and out of the 5 I have this is the highest usage. Still a little high: https://spark.lucko.me/r82APbBHfQ but might be from some players.

Otherwise I just want to let you know about 2 more issues which would be really great if fixed for 1.20.1.

#7671
#7872

The first with the crafting cpu is annoying because is destroys servers when players start to break their co-processors.

I know you guys want to stick to the latest versions, but atm9 skies has just launched on 1.20.1 and atm9 will be going strong for the next year :) Thanks for everything

commented

Yeah #7872 is a potential fix for #7671, but requires an almost full redesign of the grid system. So much has changed between 1.20.1 and 1.20.6 that it means we'd have to do it twice, so that is highly unlikely.

I can take another look at #7671 however, since that should already have been helped by the fixes for this issue.

(oh and p.s.: 1.21 is coming out in a week or so :-P)

commented

Yeah #7872 is a potential fix for #7671, but requires an almost full redesign of the grid system. So much has changed between 1.20.1 and 1.20.6 that it means we'd have to do it twice, so that is highly unlikely.

I can take another look at #7671 however, since that should already have been helped by the fixes for this issue.

(oh and p.s.: 1.21 is coming out in a week or so :-P)

Thanks for everything, can't wait for 1.21 although the all the mods dev team just released atm9 skies on 1.20.1 so 1.20.1 will be very popular for another 2 years. You can close this now