MineColonies

MineColonies

57M Downloads

Server Lag when even one player is online.

GAPUniverse opened this issue ยท 7 comments

commented

Prerequisites

  • [X ] I am running the latest alpha version of MineColonies and Structurize for my Minecraft version.
  • [X ] I checked the MineColonies/Structurize wiki and made sure my issue is not covered there.
  • [X ] I made sure that this issue is not a duplicate of any existing issue.

Context

  • Minecraft Version: 1.16.5
  • MineColonies Version: 0.14.68-ALPHA
  • Structurize Version: 0.13.148-ALPHA
    Direwolf20 1.16 version 1.7 modpack:
  • Minecolonies and structurize updated to latest Alpha
  • rats/ratlantis mods deleted.

Problem description

Server runs into trouble with 1 person online (A TPS between 10 and 12) Server tick around 10000ms behind. And as soon as a second person joins it goed all the way up to 20K ms. With the Spark Profiler It seemed like it was Minecolonies but tbh I'm not really sure.

Notes or related things

Spark profile: https://spark.lucko.me/#VrddB58vUG
TPS pic: TPS


Viewers

  • Add a thumbs-up to the issue to vote for it. This helps the request become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
commented

Not MineColonies. Connecting refined storage to your warehouse does cause lag. It's accessing a very very large number of physical storages and counts the slots every tick. Even though refined storage should definitely improve that to not have to run this every tick. I'll add a slight improvement to this.

Because I don't really need the connection between my warehouse and RS I've removed the connection, the only thing is that it didn't chance my low TPS and the high number of ms I'm behind(other players have no connections between RS and warehouse and I've even destroyed my storage of RS). Do you think that removing the RS mod completely wil fix the problem?
(I've made a new Spark profile just in case) https://spark.lucko.me/J5scZhiWHE

commented

The profile log seems relatively normal, most of the lag seems to come from collision handling though which is weird. Have you tried running your server with performant yet?

commented

Not yet, but will certainly try it.

commented

Not MineColonies. Connecting refined storage to your warehouse does cause lag. It's accessing a very very large number of physical storages and counts the slots every tick. Even though refined storage should definitely improve that to not have to run this every tick. I'll add a slight improvement to this.

commented

Took a look at your report, and made a quick summary:

Lag sources:
Chunks: 21%
Refined Storage: 16%
Machine blocks: 10%
Minecolonies: 6%

I'd say your worst offenders are refined storage and a high amount of loaded chunks.
Refined storage you probably want to avoid using any external inventories with, their design is very laggy for those.
To deal better with the chunklag I'd suggest two of my server util mods:
https://www.curseforge.com/minecraft/mc-mods/dynamic-view Changes view dist to fit tps
https://www.curseforge.com/minecraft/mc-mods/limited-chunkloading Unloads chunkloaded stuff a while after player logs.

Also gonna close this since there is no big lag standing out from minecolonies in there

commented

I still wanted to thank the both of you guys. The server performance improved a lot and it's even possible to reach a TPS of 20 again when 2 players are online. I did however leave the minecolonies pathfindingmaxnodes setting from 5k to 3k otherwise the lag would return. (I forgot to mention I did this when creating this issue).

commented

minecolonies pathfinding is offthread though, so it has no effect on tps xD