liyunfan1223 / mod-playerbots

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

The CPU usage is really hard to describe. #137

Closed zhangbo8418 closed 7 months ago

zhangbo8418 commented 8 months ago

QQ截图20240219170733

htc16 commented 8 months ago

The fewer bots on your server, the less resource consumption.

zhangbo8418 commented 8 months ago

The fewer bots on your server, the less resource consumption.

The problem is that no matter what kind of CPU, no matter whether the CPU is strong or weak, I use ARM64 and x86_64 CPUs and there is always one CPU core that is 100%, which is outrageous.

liyunfan1223 commented 8 months ago

Do you have any real trouble? I don't think high CPU utilization is abnormal. It means your hardware is working, that's all.

zhangbo8418 commented 8 months ago

Do you have any real trouble? I don't think high CPU utilization is abnormal. It means your hardware is working, that's all.

High CPU usage is really not a problem. The problem is that no matter what kind of CPU it is, there is always one CPU core that is used at 100%.The htop command checks that there is always a CPU core usage of 100%.

Xeon® E-2174G Intel® Xeon® E-2174G

J4125 Intel® J4125

Realtek RTD1296 SoC Realtek RTD1296 SoC

nl-saw commented 8 months ago

Maybe try a profiler: https://learn.microsoft.com/en-us/visualstudio/profiling/cpu-usage?view=vs-2022 ?

I'm running a server with 2500 bots and I do not have your issue: image

Thread-wise, the only settings I adjusted: ThreadPool = 8 MapUpdate.Threads = 8

Lastly, I noticed you're running into swap, which is extremely bad for performance in general.

noisiver commented 7 months ago

I'm running 2 realms on a single system, one does not have playerbots but has preloaded grids and creatures set as active, and I don't run into this issue. I'm basically putting as much load as I can on the system, which is aarch64 hosted by Oracle, and it's still not maxing out.

image