azerothcore / azerothcore-wotlk

Complete Open Source and Modular solution for MMO
http://www.azerothcore.org
GNU Affero General Public License v3.0
6.45k stars 2.59k forks source link

How to further optimize the CPU usage of World Server processes? #19371

Open moncat2005 opened 2 months ago

moncat2005 commented 2 months ago

Current Behaviour

Currently, I am using native Azerothcore code to compile and run WorldServer on a VPC with 8VCPU+8GB of memory.

If configuration optimization is not done, the CPU usage will be between 80-100% after startup with 0 players. ORG-CPU

This phenomenon started in the second half of last year, and after dealing with the grid issue in November, I found that two configuration parameters had an impact on it.

  1. minworldupdatetime=1 Change to 10, reduce CPU usage to 38% -50% The minworldupdatetime directly affects the diffs time slot value displayed on the console. The original default was 1, but after changing it to 10, the diffs became 11. ORG-CPU-min This belongs to the world time slot parameter, amplifying it by 10 times may cause a delay of 10 times for all responses in the world.

  2. mapupdateinterval=10 Changing to 100, further reduces CPU usage to 20-30%. ORG-CPU-min-map I suspect that amplifying this parameter by 10 times will cause a delay in the judgment of the map, leading to things like passing through walls or entering the ground.

I don't know what everyone's worldserver and configuration files are like. Is the default configuration really occupying such a high percentage?

Expected Blizzlike Behaviour

Restore normal CPU usage under default configuration

Source

No response

Steps to reproduce the problem

Compile and run native code The TOP command checks the CPU usage of the worldserver process

Extra Notes

No response

AC rev. hash/commit

debug1 debug2

Operating system

ubuntu 18.04

Custom changes or Modules

No response

PkllonG commented 2 months ago

my server minworldupdatetime=10 mapupdateinterval=100

kissingers commented 2 months ago

my setting minworldupdatetime=10 mapupdateinterval=50

kissingers commented 2 months ago

mapupdateinterval if too big. the creature die will later. I try set to 5000, the creature died but till 0-5000 that really display die.

kissingers commented 2 months ago

entering the ground need revert half a pr, shine a distance need add z 0.5 every times, so all ok.

kissingers commented 2 months ago

image

image

slavanorm commented 2 months ago

i think means of improving performance could be better documented in conf file

moncat2005 commented 2 months ago

@kissingers It is not common for characters to pass through walls or break through the ground due to skill displacement. However, when a character is hit by a boss or knocked off by a skill, it is indeed relatively easy for them to penetrate walls or break through the ground. Especially on slopes or stairs, problems are more likely to occur. Is there any good way to deal with this?

kissingers commented 2 months ago

I haven't encountered many situations where I fall after being hit by creature in onelife mode. It's more common for mages to fall after using Blink or warriors after using Charge. May can look for a place that handles knockback skills uniformly, and also apply a Z + 0.5 to the target coordinates. In Blizzard's servers, I remember there is such a way. You can duel with a Warlock and be feared to a high point that players cannot reach by themselves, so Blizzard might have actually added a Z component.