celguar / mangosbot-bots

Bot AI Core from ike3 for cmangos/mangos classic/tbc/wotlk
https://github.com/cmangos/playerbots
86 stars 40 forks source link

LOW CPU USAGE #65

Closed Stas724 closed 2 years ago

Stas724 commented 3 years ago

Hey; so I am curious to find out how do I increase the CPU USAGE for the MANGOS SPP for WOTLK 3.3.5a client. |

Currently running the latest version of SPP_Server from GITHUB that you have provided. I have multiple machines at home using 10900K's with 5.2GHZ & 64GB DDR4 @3600 MHZ CL16 and I feel like with the config I have set I should have more CPU usage. I have used the # AI Playerbot Alone Activity AIPlayerbot.botActiveAlone = 100

meaning 100 percent of the bots should be fully active which seems like they are? but only having 15 percent cpu usage. no matter if I increase the Playerbot from 500 to 5000 I still am only getting 10 - 15 percent cpu usage.

any commands I can use to have my cpu usage set to 90 percent as this PC would be a 24/7 dedicated server. Thanks!

https://ibb.co/3pFNNNV

celguar commented 3 years ago

@Stas724 Hello, try increasing MapUpdateThreads in mangosd.conf. Default is 3, make it CPU threads - 1. I think it's unlikely that server will use your CPU fully, but at least more than 15% for sure. Because default threads = 3, so it's probably 15% of your threads

Stas724 commented 3 years ago

@celguar Will try that; Reason behind why I am trying to get more of my CPU to be used is mainly for stability and a smoother process. I am no coder or anything along those lines. but I feel like there should there is more room for my CPU to have more resources and used just because it is available.

I have so many machines just because i am mining ETH and have very very efficient power consumption and CHEAP electrical. only 0.07 cents "USD" per kilowatt. <3

celguar commented 3 years ago

Sadly server is not coded to separate all its processes into many many threads, so it won't be able to fully use your CPU, but that MapUpdateThread config should give it a bit more power

celguar commented 3 years ago

@Stas724 Actually in next update we will lower CPU usage as we will make less computations for bots far away from real players. This will allow to have more bots and less lags if there are not very many real players in all parts of the world.

Stas724 commented 3 years ago

@celguar Gotcha gotcha. Per-say this update rolls out. Do we have an option to manually change / revers the computation changes? I like the idea of a bots grinding / questing from 1 - 80. That way when a friend comes online the realm feels populated anywhere he goes by zone. for example. bots start from level 1. a week later a friend logs in and those level 1 bots are now level 25 and grind / questing in duskwoods.

celguar commented 3 years ago

@Stas724 you can still use bot active 100 setting as before. It's just server will make less computations for far away bots, it doesn't mean then won't be active. This is to speed up total server calculations and world delay in result.

Stas724 commented 3 years ago

@celguar Gotcha, now I understand. (: I appreciate you for explaining all this to me.

DrumNoVoice commented 2 years ago

Hello everyone, just did cpu threads -1 and when server was launching I saw an error, smth like "cpu threads can not be negative". Am I doing smth wrong? Or it need to be written like "- 1" with space?

celguar commented 2 years ago

Hello threads number should be a positive value

DrumNoVoice commented 2 years ago

Hello threads number should be a positive value

hmm, so, as I can understand, if I write 1, the cpu usage will be better? :D

celguar commented 2 years ago

Hello threads number should be a positive value

hmm, so, as I can understand, if I write 1, the cpu usage will be better? :D

I don't know what do you mean by cpu usage

celguar commented 2 years ago

you can read whol conversation for details

celguar commented 2 years ago

make it CPU threads - 1 means CPU threads number - 1

celguar commented 2 years ago

No more significant improvements to multi threading are planned soon. Closing