CraftBook 3

CraftBook 3

139k Downloads

Task: MechanicClock(interval 2) scheduler causes redstone lag (TPS=5)

LadyCailinBot opened this issue ยท 14 comments

commented

CRAFTBOOK-2823 - Reported by andy.armanini

This has happened on both build 3403 and 3460. I'm uncertain as to the exact cause but this has been repeated three times today. TPS drops from 20 to 5 after placing a CraftBook IC. Initially this was thought to be related to MC1421(clock) but on the last restart the lag returned after placing only an MC3030(RS NOR latch).

After restarting the server the lag usually is not present until placing an IC, however once it did not go away at all.

The overloaded scheduler task is always listed as "Task: MechanicClock(interval 2)"

With CraftBook loaded:
http://aikar.co/timings.php?url=6661249
http://aikar.co/timings.php?url=6661861
http://aikar.co/timings.php?url=6661965
http://aikar.co/timings.php?url=6662352

Without CraftBook loaded:
http://aikar.co/timings.php?url=6662179

(Could be coincidence but I get an exception while starting CraftBook about an MC1200 with a bad mob type "MONSTER" I have no idea how to locate it, FalseBook had a command that located ICs for you.)

commented

Comment by andy.armanini

Worked out which of the 11 worlds the MONSTER spawner was in by unloading each and restarting cb. That world is now unloaded and the error no longer occurs on /cb reload. But the redstone lag is still present.

commented

Comment by andy.armanini

Okay I now have zero exceptions in my startup and the lag returns after a compete server restart. The laging item is still the Task: MechanicClock(interval 2).
http://aikar.co/timings.php?url=6666888

This is the current loaded ICs:
http://monosoho.net.au/report.txt

I've taken the server offline and am unloading all the worlds to see where this lag might stem from.

commented

Comment by me4502

You have some planters, harvesters, etc. they are incredibly resource intensive. Try disabling them in the config.

commented

Comment by andy.armanini

I found a huge automatic farm one of my players had built, tentatively saying the planters and harvesters there may have been the source. Cross fingers.

commented

Comment by me4502

Hmm. You could try turning down the max IC radius in the config, that may fix most of the lag issues.

commented

Comment by andy.armanini

That's an idea, but this guy had multiple levels from just under the surface to bedrock. He built the thing, then forgot he had it under there. So it's been running continuously for a few weeks. This is why I've been seeing star lag for a while, the player swore he'd turned all his experiments off.

Thanks for your help. I guess we can close this as PBKAC.

commented

Comment by me4502

I've just recently optimized the MechanicClock. It should be slightly faster than it was before. I know on a server with 1000 cooking pots, the time was divided by 5.

commented

Comment by me4502

Setting this as fixed, due to the above speed difference.

commented

Comment by me4502

Okay, so it occurred before the rewrite, and after.. So it's not a rewrite issue, but the cause I'm unsure of at this point in time.

Next time it's lagging, type /cb report -i
that creates a report with the location and sign of every loaded IC. You may have an IC that is causing this lag.

commented

Comment by andy.armanini

Will check on that rogue sign with this command.

commented

Comment by andy.armanini

After removing all the mob spawners in the world I'm still getting the same error:
http://monosoho.net.au/log.txt

The output of report now looks like this:
http://monosoho.net.au/list.txt

Is it possible that the report does not list the IC with the exception because it cant load it?

Lag has disappeared, but it's done that before. This is a fun one.

commented

Comment by me4502

You have something trying to spawn a MONSTER, which hasn't existed since 1.5 beta. It is possible that is why it isn't listed.

commented

Comment by me4502

Also, it seems you have an invalid Plc somewhere judging by the first error.

commented

Comment by andy.armanini

I found the PLC and broke it, still getting the MONSTER error and the lag. Hard to track down the MONSTER spawner as I have no idea where it is. Still looking... (sorry this seems to have descended into a support thread)