BuildCraft|Core

BuildCraft|Core

7M Downloads

Planter uses too much CPU with very big (Zone Planner) working areas

Wykks opened this issue ยท 12 comments

commented

Nothing in the serveur log... It happend sometimes, alone without doing anything particular :/

Visual of the issue :
image

The lumberjack is stuck (the 2 others are stuck inside the trees). Until I remove the tree manually, the serveur is using around 100% of his cpu.
(The farm is speedup by an agricarnation from Botania)

Maybe related to #3064

Good luck, and thanks for maintaining Buildcraft :)

Edit : Forgot versions : Forge 10.13.4.1492 ; Buildcraft 7.1.9 & Buildcraft compat 7.1.1

Edit2 : Here a file generated by sampler during the robot lag issues :
https://www.dropbox.com/s/jqu53szc5n2gt61/buildcraft_lag.nps?dl=1
And without issues :
https://www.dropbox.com/s/37sw4w4ph3v5mdp/no_lag.nps?dl=1
(works with VisualVM)

Edit3: Oh by the way, after a while, the robots manage to work again, until the next time.

commented

When you clear the trees, are the trapped robots' light turned on, or is it black?

also, when the server goes to 100% cpu, try picking up the planters, according to the reports they are the ones eating the cpu.

@asiekierka regarding the issue where lumberjacks get stuck in the leaves there's a couple ways to fix it if you want to.

  1. allow robots to go through leaves by changing the line at https://github.com/BuildCraft/BuildCraft/blob/7.1.x/common/buildcraft/core/lib/utils/PathFinding.java#L230
  2. make it so when an EntityRobot detects that it's inside a block, they increase their y coord until they are free
commented

It seems like there are multiple issues.

  1. Robot stuck :
    2015-10-13_12 58 03
    The 4 robots flying in this picture are not moving. They were stuck inside a tree, and they remain turned on.
    Eventually they unlock themselve after a while.
  2. Planter active for nothing
    2015-10-13_13 05 57
    3 planter on, but they have nothing to do, until there is a space to plant something.

If I pick up the planter while the first issue is happening, the cpu stay at 100%.

Edit : sampler dump when robots are stuck (screenshot 1) but without planter :
https://www.dropbox.com/s/isdaidynojxp24n/buildcraft_lag_no_planter.nps?dl=1

commented

Well, now they increase their y coord for sure !

2015-10-15_13 45 04

Farewell my dear robots :D

(v7.1.10)

commented

Haha.

...That did definitely not happen in my devenv. Any specific places where it happens?

commented

Nothing specific. After I updated buildcraft, my robots were not here anymore (but their docking station still red). So I tried to replace some new one... They flew away :D

Not all of them. The 2 remaining robots are doing weird stuff :
http://webm.host/a0f52/

Edit : Just reconnected to check, It seems like they can still be stuck :
2015-10-15_14 55 57
But ! My server CPU is fine this time (they aren't active after all, more precisely "dead")

Edit2 : It doesn't happend everytime... I'm doing another short video, because it's very random.
One obvious case is when they are too close to each other, they repeatedly try to escape... to the sky :D

commented

Okay, so the remaining issue here is: Planters do too many checks on the (non-thread-safe) World object itself. This cannot be fixed without a rewrite, however a lot of mitigation measures were applied in BC 7.1.11+.

commented

I didn't saw it at first but it seems the zone planner changes led to a new issue :/

My picker configured with zone planner doesn't work well since buidlcraft 7.1.11
They either do nothing, or pick a tiny amount of item then go to station.

Edit : Oh well everything is weird (robot not taking all the wood too), I think I'll disable this wood farm for now :o Thanks again for helping, robot are still awesome for many other stuff :D

commented

Okay, could you get on our IRC? I'll send some test builds your way.

2015-10-15 17:00 GMT+02:00 Wykks [email protected]:

Complete video : https://www.youtube.com/watch?v=7h8eyJxS8jE

โ€”
Reply to this email directly or view it on GitHub
#3068 (comment)
.

commented
commented

Just let my lumberjack running because why not. Then this happened :
2015-10-16_15 16 23
That's funny :D I have no idea how they managed to stop like that ("dead" state)

(Sorry If kind of spam you with that, I think it's better to show it than hidding it..)

commented

does the planter still use as much CPU? outdated milestone as well

might be better to close this issue (and related ones) and make 1 issue to do some profiling and checking on the BC components to see what is using the most ticktime and if that can be improved