CitizensDev / Citizens2

Citizens - the premier plugin and API for creating server-side NPCs in Minecraft.
https://citizensnpcs.co
Open Software License 3.0
589 stars 313 forks source link

Citizens affecting server TPS #2657

Closed FlamerAwesome closed 2 years ago

FlamerAwesome commented 3 years ago

I had a previous issue that was labelled as "NPCs rapidly spawning and despawning due to chunk loads from the navigator", this was fixed but shortly afterwards a new issue presented itself on the same version as the fix came. The issue was that a specific place on my map was unloaded and npcs were trying to reach their destinations over there, but now my tps will randomly drop. I did a spark to sample for this and I believe the issue is coming from citizens. (also the tps issue only happens if a player is in so I believe it should be related to chunk loading) - Link to server log & Citizens config (using e.g. pastebin.com) Previous Ticket: https://github.com/CitizensDev/Citizens2/issues/2645 Citizens Config: https://paste.denizenscript.com/View/88254 Saves YML: https://paste.denizenscript.com/View/88256 Log: https://paste.denizenscript.com/View/88255

[18:19:26 INFO]: Citizens version 2.0.28-SNAPSHOT (build 2372) [18:19:26 INFO]: Website: http://www.citizensnpcs.co [18:19:26 INFO]: Author: fullwall

236 NPCS

SPECS: AMD Ryzen 5 2600 Six-Core Processor 16 Gb ram 2tb storage (1tb free)

The output of command /version on my server is: (PLEASE FILL IN) [18:19:03 INFO]: This server is running Paper version git-Paper-788 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT) You are running the latest version Previous version: git-Paper-786 (MC: 1.16.5) The output of command /version citizens on my server is: (PLEASE FILL IN) [18:19:26 INFO]: Citizens version 2.0.28-SNAPSHOT (build 2372) [18:19:26 INFO]: Website: http://www.citizensnpcs.co [18:19:26 INFO]: Author: fullwall

SPARK PROFILER VVV https://spark.lucko.me/tVNJ0xDcx1

FlamerAwesome commented 3 years ago

https://paste.denizenscript.com/View/88253 this is a command i ran that mcmonkey asked me to run for the previous ticket

FlamerAwesome commented 3 years ago

Update: I found a temporary fix , when I forceload all the chunks of npcs with pathing the tps is fixed. I have done this and the past like 7 days I have had perfect TPS, so this does have to do with citizens and chunks still

FlamerAwesome commented 2 years ago

Hi, sorry I don't want to seem like I'm pushing this but has there been a fix released? I don't want to unload the chunks to find out

mcmonkey4eva commented 2 years ago

Considering this issue seems to be specific to you and hasn't been matched by anyone else, the awkwardly outdated server version, and the lack of clear path to investigate beyond discussions that already happened on Discord ... It's been a while but iirc there was no consistent source of chunk loading other than generic player chunk loading, and we already discussed workarounds like using /npc chunkload to remove the Citizens portion of the chunkload lag (leaving the rest as a Paper/general server issue not relevant to Citizens).

I'm going to close this issue on the grounds that it's not really likely to go anywhere.

As far as your server - if you're still having issues, I'd recommend A: updating to latest versions (1.18.1 and all) B: trying /npc chunkload on all relevant NPCs and any other tricks you were previously suggested as a workaround C: If you want, open a thread on Discord