Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upHigh CPU consommation of citizens #1673
Comments
This comment has been minimized.
This comment has been minimized.
|
mcmonkey4eva
added
the
Help Request
label
Jan 19, 2019
This comment has been minimized.
This comment has been minimized.
Here is the report : https://timings.spigotmc.org/?url=bimafuwesi |
This comment has been minimized.
This comment has been minimized.
It looks like your server (or at least Citizens) loaded during the timings recording sequence, which is distorting the accuracy of the timings report. Please try to start recording timings after the server is loaded to avoid it being offset by slow load times. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I don't know how or why you uploaded your config as a zip file but I repastebin'd that for anyone else trying to look at it: https://pastebin.com/2DU8KgMF |
This comment has been minimized.
This comment has been minimized.
Yeah sry, forgot that, thanks ^^ |
This comment has been minimized.
This comment has been minimized.
The new timings link was recorded with Citizens loading in during the timings still. Please fix that. You may want to switch ... I have no idea why you just pastebin'd the thing I already pastebin'd for you as a reply to me pastebinning it for you... |
This comment has been minimized.
This comment has been minimized.
Yeah sorry, i'm so tired right now so i'm getting stupid ^^ |
This comment has been minimized.
This comment has been minimized.
Turn timings on manually, not automatically. |
This comment has been minimized.
This comment has been minimized.
Ehm, that's really weird but it seems that the new citizens version that I installed corrected every lags, cause now, the plugin takes only 1/10 of the cpu's time ?? _ edit : this comment is false, I don't know why but 6 seconds after the comment, citizens came back to 1/5 of cpu's time |
This comment has been minimized.
This comment has been minimized.
Is this link is good ? |
This comment has been minimized.
This comment has been minimized.
That's a better recording. |
This comment has been minimized.
This comment has been minimized.
My plugin use citizens API to create some custom "mobs" who needs new path finder, else they are useless cause we can block them behind a wall ... Could I add pathfinder to these mobs by my plugin ? Like that it will avoid others npc getting a path finder ? |
This comment has been minimized.
This comment has been minimized.
I desactivated the use-new-finder and now, citizens is taking 1/3 cpu's time, I don't think that's cause of the use-new-finder:false, but it doesn't reduce lags :( |
This comment has been minimized.
This comment has been minimized.
That recording is from load time again |
This comment has been minimized.
This comment has been minimized.
This one is good ? https://timings.spigotmc.org/?url=hibujapoco |
This comment has been minimized.
This comment has been minimized.
I removed npc wich are using /npc path and the cpu consommation decreased a lot (citizens takes 3% approximativly), so is there a way to make npc move without consumming all cpu ressources ? |
This comment has been minimized.
This comment has been minimized.
Usually in pathfinding is making a severe impact on a server, it's from NPCs walking complex or blocked paths. You also mentioned you have a custom plugin giving paths to NPCs: it's possible your plugin is at fault here, eg if it's giving new paths very rapidly or is giving complicated path requests |
Elytes commentedJan 19, 2019
Hi !
I'm making a server since months, and I've got much problems with citizens consommation. Citizens takes 99% of total cpu consommation (1% are others plugins) and 1 second per 5.2 seconds of cpu's time is used for Citizens, and that's decreasing the average tps of the server.
I'm using the version 2.0.24-SNAPSHOT (build 1591).
I've got 39 citizens and I will need much more in the future :/
I descreased retry delay while skin is lost, updated the packets update delay to 50 and pathfinding update path rate to 10 (i'm using the new finder with 5000 max iterations).
Much of these npc are moving with path and I forgot to use triggers so there is just a lot of waypoints where the npc needs to stop, but by looking at the source code, it seems that you don't load every waypoints each time the npc walks, so that wont makes the server lags uh ?
Tell me if you got any ideas to decrease cpu consommation ^^
Thanks