liyunfan1223 / mod-playerbots

AzerothCore Playerbots Module
https://discord.gg/NQm5QShwf9
GNU Affero General Public License v3.0
290 stars 158 forks source link

Huge laggs starting to occur after 1-2 hours #743

Open nl-saw opened 2 days ago

nl-saw commented 2 days ago

Describe the bug Server running with 3000 bots, when started and all bots have initialized, the DIFF is about 30-45 ms without laggs. This generally stays the same over time but after 1-2 hours (depending on the amount of bots and the inactivity settings) there start to be huge laggs, increasing in both intensity and frequency (up to 6 seconds and beyond!). When you start noticing the issue it becomes exponentially worse, quickly. At that point the game becomes basically unplayable. When lowering the amount of bots, and/or decrease their activeness/increase idling times the problem is just delayed. After a server restart all is fine once again for 1-2 hours and the cycle repeats. Can someone help me with what I can do to help pinpoint the problem? I am not a hardcore developer, but I can manage my way around with some directions.

Commit hash AzerothCore rev. 1294d79764e3 2024-11-25 23:22:31 +0800 (Playerbot branch) (Unix, RelWithDebInfo, Static) (worldserver-daemon)

To Reproduce Steps to reproduce the behavior:

  1. Start a server with 3k bots.

Only following mods are enabled:

  1. Wait (or play) for 1-2 hours
  2. Observe insane DIFF times up to 6+ seconds.

Expected behavior There should be no laggs of 1+ seconds happening over time.

Screenshots n/a

Hardware Processor: AMD Ryzen 7 7800X3D 8-Core Processor Number Of Processors: 16 Physical Memory: 64 GB

Operation System Ubuntu 24.04.1 LTS

Additional context I haven't played around with Playerbots for around a year, so I have 0 clue where this problem might have started for me meanwhile, but this behavior was not happening back then. My server's config files attached. For MySQL I basically just increased the innodb_buffer_pool_size to 32 GB, and I do not see any performance issue with it.

playerbots.conf.txt worldserver.conf.txt

davvvve1 commented 2 days ago

playerbotsconfig

AiPlayerbot.MinRandomBots = 3000 AiPlayerbot.MaxRandomBots = 3000

AiPlayerbot.RandomBotJoinLfg = 1

AiPlayerbot.RandomBotAutoJoinBG = 0

AiPlayerbot.BotActiveAlone = 10 AiPlayerbot.botActiveAloneSmartScale = 0 AiPlayerbot.botActiveAloneSmartScaleWhenMinLevel = 80 AiPlayerbot.botActiveAloneSmartScaleWhenMaxLevel = 80 AiPlayerbot.ProbTeleToBankers = 1 Maps where bots can be teleported to

AiPlayerbot.RandomBotMaps = 0 (---- Yes with the

Change mapupdate to 4 in the worldconfig

Not to solve it but works for me. I have some crashes but i belive its cause that it is alot of bots in one city . But can play like 10 hours .

nl-saw commented 2 days ago

AiPlayerbot.BotActiveAlone = 10 AiPlayerbot.botActiveAloneSmartScale = 0

Thanks for that suggestion, with forced 10% i made it past at least 3h. (Stopped to make changes at that point). Will play around with it some more.

Screenshot_2024-11-26_21-30-47-3h

davvvve1 commented 1 day ago

https://github.com/liyunfan1223/mod-playerbots/wiki/Playerbot-Configuration

maikale commented 1 day ago

I had this problem too, I changed MapUpdate.Threads = 6 just that and I no longer have problems. 4 days running with 3500 bots and I have no problem

maikale commented 1 day ago

innodb_buffer_pool_size to 32 GB

I didn't do that either and had even more problems than a solution.