MineColonies

MineColonies

57M Downloads

High resource usage

DaRealMcCloud opened this issue · 14 comments

commented

Minecolonies version

Version:
minecolonies-1.12.2-0.10.553-BETA-universal.jar
minecolonies-1.12.2-0.10.493-RELEASE-universal.jar

Expected behavior

One colony with 30 citizens running smoothly on 3.8Ghz cpu, 8GB ram.

Actual behaviour

Lots of "Server cannot keep up" messages, game freezing (citizens not moving),player position reset.
server_overloaded.txt

The trace seems to point to minecolonies.
Spark trace at daytime:
https://sparkprofiler.github.io/#yDyGefIydZ

I was unsure when I saw in the trace that it appears worldgen is loaded for the AI ?
getBlock

Colonie .dat files.
colonies.dat.txt
colony1_0.dat.txt
(github didnt let me upload .dat directly)

Steps to reproduce the problem

Add Minecolonies to Direwolf20 1.12.2 Pack.
Build colony with 1 warehouse.
After a while the lag starts and becomes stronge.

The lag only appears during the day.

Spark at night time:
https://sparkprofiler.github.io/#BqKOo7IlzT

commented

ye apparently it incorrectly accesses unloaded chunks, could you try again on the latest alpha?

commented

Thanks for your quick reply!
Loaded with minecolonies-0.10.574-ALPHA-universal.jar

The result looks identical: https://sparkprofiler.github.io/#xB6z72oowa
getBlock_alpha

commented

thanks for doing another test :) ye it definitlity is still bugged, it should never access positions which arent loaded(accessing causes them to load). Could you zip&send your world folder? usually quite helpful for debugging it

commented

@someaddons I believe we’ve had this issue for ages, I don’t know if we ever fixed it. @Raycoms would know

commented

ye I know, Ray recently fixed it there though :D

commented

btw @DaRealMcCloud its caused by a workorder, if you pause your builders it should stop lagging for now so you can keep playing

commented

Thanks for the update.
Will do that. We have 4 Builders working right now, might also be too much.

Zipping and downloading from the server right now.

commented

nice, 4 builders is fine if none of them bugs out and goes loading chunks :D

commented

Okay we won't kill them just yet ;)

Took a bit longer because i tested on another server if the files produce a working server.
The server can be downloaded from: https://www.mediafire.com/file/7pzw9gqggvxof8m/server_DireColonies20.zip/file
Just unzip server_DireColonies20.zip then unzip theWorld.zip and run with:
java -server -Xmx6G -jar FTBserver-1.12.2-14.23.5.2821-universal.jar nogui
(accept gernerated eula and run again)

Colonie is at: X=1919 Y=66 Z=396

commented

thanks for your effort, having the world is quite helpful :)

commented

Just an update:
We had disabled all builders and the cpu lag spikes were gone, we suspect that something else was also wrong on the map iteself though. Evertime we load this world we have 10GB memory usage, even with no one logged in 0_o.
We have started a new map and so far no issues.

Please let me know if you would like us to test something on the old world again.

commented

had that in the past aswell, turned out that minecraft had run into an issue and you had to delete the world/data/Mineshaft.dat file, it only contains some metadata for mineshaft generation, but for some reason sometimes bugs out

commented

The high memory usage probably causes issues with chunks which causes these issues with the builder.

commented

I had this exact problem time to time, and what someaddons says about the mineshaft.dat file growing a lot is true, but that is the effect of something loading chunks in many unexplored areas of the map.

I recomend to check the 'region' folder and look for some region files pointing to very big coordinates like r.500.5, (the 2 numbers referes to a region coordinate, i.e a number like 500 refers to a region containing blocks 256000 to 256511 in that coordinate. . check if you have many of them accesed in a short periodo of time

After reading this, i reloaded a backup of a server that was in this state (generating that big region files and lagging like hell while doing so), i fired the builders in that save and the region files generation / lagging stops, It was on a very old version anyway, i cannot replicate on the newest alpha, but in some recent time (2 weeks) it generated that many region files also. i just cant catch whats is exactly detonating the problem