Mob Grinding Utils

Mob Grinding Utils

57M Downloads

strange massive perforamce drop after restarting server

Pultex opened this issue · 7 comments

commented

Not sure how to give any info other than version numbers
unless there is some sort of logging I can turn on to give you

mod version: mob_grinding_utils-1.18.2-0.4.46
minecraft: 1.18.2
forge: 1.18.2-forge-40.1.84

shutting down the server everything seemed fine
after starting it again unless all the grinders are removed fps drops from 120 to 30
tp drops to 15 from 23
not sure what is happening maybe chunk loaders are effecting the crushers

can't use the mod anymore was working fine before restart

commented

have you tried any profilers? like spark
if you can reproduce the slowdown, try profiling with it and sending the data.

commented

Very interesting, while i do need to take a pass at optimizing the masher sometime, the profiler results are very interesting.
It looks like the lag is coming from DCIntegration, its hooking into all entity deaths, and checking some discord link stuff, which is causing all deaths to have a small amount of lag.
And with those crazy spawners, guess whats producing alot of deaths lol.

The culprit seems to be this line here.

Its querying if a player death should be hidden from discord, before checking if it is a player...
the player check is being preformed after.
image

Also, there is a setting in ftbchunks worth looking into for a public server with people leaving stuff running, and sometimes quitting.
In the server world config for ftbchunks, there is a setting. "chunk_load_offline" which if turned off, will make the chunk loading only function while the player is online.

commented

More Info on TPS impact of Mob Masher

I moderate a public ATM8 server which as you may know, has MGU, and the Mob Masher has always been an outlier out of all the other laggy blocks/machines. The Mob Masher usually gets up to 1500+ μs/t (microseconds/t), but just yesterday a player's Mob Masher went up to 18,000 μs/t in combination with a nearly maxed out Apotheosis spawner.

To give you some perspective, a 1500 μs/t mob masher isn't great, but it doesn't have a noticeable delay on player actions, the server can handle that much. But the 18,000 μs/t mob masher was so taxing all of our actions were delayed by a few seconds. Containers couldn't be opened for several seconds either.

Profiler Reports

  1. Observable profiler from the player's masher yesterday: https://o.tas.sh/#AXQ9 (18,000 μs/t)
  2. Observable profiler from my own test on the same server: https://o.tas.sh/#J6Qq (IT WENT UP TO 140,000 μs/t ???)
  3. Spark profiler from my own test: https://spark.lucko.me/RE4t0QH3F2

Variables

It seems like the Mob Masher's TPS usage freaks out if it has to deal with a lot of entities, and you get a lot of entities if you fully upgrade your apotheosis spawner.
I don't know if the 140,000 μs/t is influenced by the absorption hopper not being able to vacuum things fast enough and the masher detecting items on the ground as entities it needs to hit.

My spawner had the following stats:

javaw_jWOWXvIRYu

Screenshots

(The in-game μs/t overlay comes from Observable)

javaw_xgBx3yvPaW
The player's masher. I do not believe his spawner was fully upgraded

2023-02-25_09 18 30
My own test, showing an astounding 140,000 μs/t mob masher.

Final Comments

As it's a public server, we have a lot of new players who come and go, and unfortunately they leave their mob grinders running 24/7 until an admin goes in to remove force load from their chunks.

However, there is currently an issue with FTBChunks that doesn't unload the chunks even when an admin specifically does the unloading action, so we were forced to actually destroy the mob masher block and put it away since the player has stopped playing. So as you can see, I'm mentally exhausted from cleaning these up every few days x)

commented

zpr6KjK

Observable Report: https://o.tas.sh/#eOw8
Spark Report: https://spark.lucko.me/QMWVdovrR9

This is without DCIntegration. Seems like it's doing a lot better with the maxed out spawner now that it doesn't have DCIntegration, but the mob masher still managed to get up to 1k+ μs/t.

commented

This is great though, the spark reports really help, i find it hard to reproduce lag intentionally, so profiles of it in the wild are awesome.

commented

In this latest spark report, the majority of the time being attributed to the masher, is the monsters dropping their loot.
image

another third is caused by the aggregate processing of 11 other mods hooking entity deaths.

commented

Thank you for such a quick response. I'm not sure if I will be able to convince the owner to do this, especially as with the current bug it's not guaranteed it will work, but we'll definitely attempt this at the very least. In the meantime, I sent this github issue over to DCIntegration's discord forum for bug reports.

However, I'm also concerned about the masher having TPS impact even before we had installed DCIntegration. I do not have proof of this but I can recall it still had microseconds in red, in the Observable overlay. I can try persuading the owner to temporarily turn off DCIntegration and produce another spark report.