-
-
Notifications
You must be signed in to change notification settings - Fork 307
-
-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Player NPC always keeps chunks loaded #1947
Comments
maybe thats why citizens is causing so much lag since 1.14.4 update? |
Citizens is not causing lag. 1.14 is lagging because 1.14 is a wreck. |
i do agree. but however when i use "React-smart server performance" to detect lag, react would often report citizens as "guilty" plugin. after removing citizens and sentinel, my lag problems are much much better. it seems like it IS a minecraft issue BUT citizens seems to be very strongly affected by it. |
Plugins like that (and also the native timings system) are incredibly inaccurate at best. Use a legitimate profiler (like Warmroast, VisualVM, YourKit, ...) if you want useful perf tracing information. |
ok. but removing citizens improved the situation so much that i am quite sure about it. |
Not going to say that I understand the latest PlayerChunkMap code but something changed and may have broken this. |
This might have been fixed by the fix for #1822 Please test on latest dev builds |
I tested for several times on build 1770 and found there are many situations. Here is the rough result. 'd' depends on the view-distance settings, calculated by chunks. For example, if view distance is set to 12, d will be 27 and d^2 will be 729, which is the amount of loaded chunks when only one user in the server. Spawn point is at the default position in the initial overworld and about (0, 0) in the Nether, End and other worlds which generated manually with Multiverse plugin. Green: only one user in the server |
|
Yeah, I think it's pretty much this. In my initial testing, I wasn't near any existing NPCs and forgot to try to go near one. I just tried it now, and the existing NPC is behaving just like any new NPC, keeping chunks loaded indefinitely even after I teleport to another world. If I restart the server after going near an NPC, the chunks around them become unloaded and only become loaded as soon as I go near them again. |
Tested locally, 1: At spawn-ish area. Checked loaded chunk count: 574 Note that I checked via Denizen In summary: I cannot replicate this at all on a clean test server. |
Tested on Paper-31 as well just to try, almost the same results except the chunk count rose to 600 after loading more in and didn't go back below that. EDIT: Actually it did eventually fall down to... 576. Paper seems to just be really really slow at unloading chunks. |
Going to suggest y'all test without other plugins involved (Y'all seem to both be using Multiverse, which is rather high on the list of plugins I'd consider suspicious). If you can replicate the problem on a clean/minimal server, please do post the details below and I'll reopen this issue. |
When a user flies to hundreds of blocks away from spawn-ish area, the count of loaded chunks is much higher. Is that a problem? |
No, that's normal. Spawn generally remains loaded continually in minecraft, so there's a certain minimum number of chunks that will always be counted, plus however many the player's have loaded |
Stripped down my plugins to LuckPerms, Vault, Essentials, EssentialsSpawn, Citizens. Tried with CraftBukkit, Paper, and Spigot. All produce the same issue using the 1.14.4-R0.1 API. I spawn an npc, leave the server, and check /lag through console with essentials. It shows that chunks are loaded at the normal render distance. If I remove the NPC, half the chunks are loaded. So either its one of these 5 plugins (not sure what any of them would be doing with chunk loading) or something in my bukkit.yml that's bad, or something else I'm not considering. Would be happy do more testing if it would help. |
@mcmonkey4eva just was wondering if you would consider reopening this issue. I am now using Paper-67 (1.15.2) and am still having the same issue with only Citizens, Denizens, and Essentials installed. I have done quite a lot of testing so I will try to divide this up as best I can. This is all done on a newly generated world, with doMobSpawn set to false to make what is happening as clear as possible. Using On leaving the world with the NPC, it seems that at I have also tested setting the NPC to types other than player, and this issue does not occur in that case. Removing the npc via console brings the loaded chunk count to 0 as would be expected with these settings. I can understand why this issue would be easy to miss, as at the standard view distance of 10, with only one NPC loaded, the number of chunks kept loaded is negligible. However, for those trying to achieve a performance boost by keeping unused worlds unloaded, this is an issue. Edit[1]: These results are also reproducible without Essentials, using Edit[2]:Also, this does not appear to be reproducible on normal Spigot, at least with the default configurations of Spigot in the 1.15 versions, as well as with the configurations I was using to produce it in 1.14.4, so it would seem something changed somewhere along the line with that. Edit[3]:Reproduction Steps
|
Sounds like the issue is now about spawn chunks not all chunks. Please open a separate issue and I can investigate. |
When I create a player npc, it always keeps chunks loaded whether it is in the playerlist.
But the wiki shows if you issue
/npc playerlist
, it'll become a 'real' player and load chunks. That's to say if an npc is not a 'real' player, it won't keep chunks unless users get close.When I'm in another world or far enough away from the npc and type
/mem
, it shows more chunks are loaded.The config
always-keep-loaded
had already been set to false.Server: Paper 1.14.4 - 187
Citizens: 2.0.25-SNAPSHOT (build 1746)
The text was updated successfully, but these errors were encountered: