Mekanism

Mekanism

111M Downloads

Mekanism machines do not idle properly when they are full

Xiaminou opened this issue ยท 20 comments

commented

Issue description:

I have been using LagGoggles around my base to track down what might be slowing down my server and I noticed this:
When a machine's output is full and it still has items to be processed in its input it will not idle.

Idle without items:
2018-01-04_14 08 57
Processing items:
2018-01-04_14 09 47
2018-01-04_14 09 49
Not processing items because output is full, but not idle:
2018-01-04_14 11 14
Idle because no input:
2018-01-04_14 11 23
2018-01-04_14 11 46

Steps to reproduce:

  1. Fill a machine's output and input

Version (make sure you are on the latest version before reporting):

Forge: 2183
Mekanism: 330
Mods: list.txt

commented

What exactly is the coloured thing measuring?

commented

Based on the modlist provided in the report, it's the mod LagGoggles, which uses a colored overlay and floating text (which you can see in the screenshots reporting times in microseconds). Per LagGoggles' description on CurseForge:

Entities are timed using System.nanotime() before and after the tick() and update() methods. These times are being recorded and sent to all online operators when the profiler is done.

commented

Woops, I forgot to confirm the edit where I added:
"I have been using LagGoggles around my base to track down what might be slowing down my server and I noticed this:"

commented

what

commented

What does the percentage mean? Percentages usually go up to 100 only

commented

as "single entities"

wtf

commented

It means his tick time is at least 344ms which is about 3 tick/s instead of the normal 20.

commented

While factory is running tps

commented

This one is small factory
2018-04-20_18 22 32

As far as i know the only mod without lags is Thermal Expansion. Even EnderIO force server to suffer from TPS drops and also it's conduits tick on client.

2018-04-20_18 27 07

commented

mekanism.zip

Contains nps snapshot to be viewed in VisualVM

commented

I know. But the problem is - this lag does happen only with mekanism logistical transporters, having eject on and have Item Lasers/TE Pipes/etc attached produce no lag on each factory eject.

commented

You're still trying to pin it on the factory, when its not the factory. Pathfinding is a very expensive operation

commented

Yes but why it recalculate path every time? And im not trying to pin it on factory. Even without eject turned on factory is still creating huge tick time lag compared to other's mod machinery. (one factory on average create 1000 microseconds vs other's average 60 microseconds at the worst)

commented

I didnt write the Transporter code. But it still has to check all the possible endpoints for one that can accept the item. In your case it spends a fair chunk of time on ItemStack capabilities due to Cyclops.

Ok, show me an NPS without eject.

commented

Will do tomorrow, it is almost 22:00 for me

commented

@roboderpy that nps suggests you have Auto Eject turned on and most of the time is spent there calculating a route.

commented

18 factories (which is less likely to occur on regular server, each player at least have 30 factories, which 9 of them are most likely continuously working)
mekanismlagg.zip
2018-04-25_06 16 48
javaw_2018-04-25_06-17-48

Test conditions - elite factories without any upgrades, eject off, autosort on, recipe - oredict (oreAustralium)

For comprasion
mekansim_lag2.zip
javaw_2018-04-25_06-32-54
2018-04-25_06 30 52
Pulverisers were doing the same job as Enrichment Chamber

Oh and EnderIO conduits were upgraded with Speed Upgrade and had Round Robin enabled.
And no. even if i post these results in "do not idle properly", they DO lag the same when they are actually full (both input and output slots are full)
please pleeeease stop arguing and face the performance of Mekanism machinery. They DO create lags. And i know a bunch of server owners who are not installing Mekanism only because of lag
machine
is full

commented

please pleeeease stop arguing and face the performance of Mekanism machinery. They DO create lags. And i know a bunch of server owners who are not installing Mekanism only because of lag

I'm simply asking you to provide the necessary data for your situation.

Those screenshots of 'Entity By Type' are useless btw, it only shows the class name.

commented

I've added some caching to the recipe lookup, this should be less of an issue in the next release.

commented

You're the best!

many thanks