Mekanism machines do not idle properly when they are full
Xiaminou opened this issue ยท 20 comments
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:
Processing items:
Not processing items because output is full, but not idle:
Idle because no input:
Steps to reproduce:
- 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
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.
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:"
It means his tick time is at least 344ms which is about 3 tick/s instead of the normal 20.
Contains nps snapshot to be viewed in VisualVM
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.
You're still trying to pin it on the factory, when its not the factory. Pathfinding is a very expensive operation
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)
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.
@roboderpy that nps suggests you have Auto Eject turned on and most of the time is spent there calculating a route.
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
Test conditions - elite factories without any upgrades, eject off, autosort on, recipe - oredict (oreAustralium)
For comprasion
mekansim_lag2.zip
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
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.
I've added some caching to the recipe lookup, this should be less of an issue in the next release.