Refined Storage

Refined Storage

77M Downloads

RS Controllers cause lots of lag

kreezxil opened this issue · 14 comments

commented

Issue description:

On my server for World of Dragons, I've using Lag Goggles located and eliminate sources of lag. Consitently I'm finding that the RS controller is a major source of it. Further I'm finding that If I set them to not work except when redstone signal is present they lag even more.

rs controller off
image

rs controller on
image

if you need an .nps report let me know and I'll get one going.

commented

I need one

commented
commented

?

I need a NPS log

commented
commented

Nah its fine. @kreezxil I cannot help with this issue.

commented

Ah, @P3rf3ctXZer0 deleted his comment so I couldn't see he was asking.

commented

I have sampler installed, nps is coming. Here's an rs controller doing 33 ms/t as reported by lag goggles. I've found some as high as 1500 ms/t.

image

sampler-snapshot.zip

here it is again, but this time I told it to only work with redstone signal and put lever on it in the off state. It's dong 216 ms/t lag now.

image

and another nps file

sampler-snapshot.zip

commented

Laggogles does not work well with Tile Entities that interact with the event bus. It then calculates things completely wrong often ending up with numbers way larger than what is actually there.

I'm also not sure you are aware of how little 1000 μs/t is. Minecraft still runs fine without lag until 50000 μs/t.

Your sampling shows this nicely:
image

You can see the controller at 30ms which is about the same as your cloches and half of what the tech reborn pipes take that are on the server (In the 10s that the server ran during sampling).

Start a crafting task that has more than 10000 steps and open the crafting monitor to see how much lag RS can produce. We know and are working on it.

commented

The file that you uploaded only ran for 10 seconds so you might have grabbed the wrong one?

Ok let me rephrase how the performance plays out:

You ran sampler for roughly 10 Seconds.
-The server was Idle for 1.5 seconds so roughly 15% of the time.
-The server spend 4 seconds updating Entities, 1/3 of that on fossils and archeology
-Another 2 seconds were spent un-/loading chunks
-Another second went figuring out players and where entities can be spawned

Then we dig deep and find Refined Storage at around 0.14 seconds total. This is for all RS systems on the server combined.

That means it spent 1% of its time calculating RS. If you are looking for better performance you are in the wrong place.

commented
commented
commented

Laggoggles is by no means garbage. It's really nice to find many basic issues, many of these are not really avoidable for (inexperienced) mod authors and can be easily fixed by the player.

But It does come with quite a few limitations and bugs. You need some idea of what you are looking at and some healthy skepticism of what it is reporting.
In RS's case, for example, almost every calculation for the whole system (+ what comes from a bug in LG) is done inside the controller. That means that it's gonna be higher than many others that only show the performance of one block.
Laggoggles cannot know that, hence the red color.

In doubt (or when the lag comes from the event bus) run sampler or the much easier to read and share spark (if you set the mappings in the top right..).

commented
commented