Jump to content

[11193][performance] Visibility updates and relocations


Guest SilverIce

Recommended Posts

Hi,

This patch reduces amount of visibility update and AI relocation notification operations -- in this way you will get some performance speedup.

In original sources these functions called too frequently - this wastes power of CPUs for nothing.

We should filter redundant visibility update operations.

Some statistics: optimization decreases amount of visibility update operations in 8-10 times(expected decrease in CPU utilization about 15-20%).

Currently these are two different ways of how it should be optimized.

The first way:

Visibility and AI notification operations processed each N milliseconds. To avoid CPU spikes these operations processed simultaneously.

Possible problem: as a result of fixed time interval between visibility updates,

its impossible to increase frequency of these operations for fast moving players/creatures.

branch1: https://github.com/SilverIce/mangos/tree/visibility_optimization_old_way

Second way:

Can't say too much. No problems with visibility of fast moving units: frequency of visibility updates scales with unit's speed.

branch2: https://github.com/SilverIce/mangos/tree/visibility_op2_simplified

Note: added few new config setting to find optimal parameters, so don't forget update your config files

Also, these config options could be reloaded during runtime: you can experiment with these options without restarting

I think second way is more progressive, but I don't know performance difference.

Please, test the patches, feel free to comment, report test results..

Link to comment
Share on other sites

Hi Silverice, i try to apply patch in my production server but code is soo much outdated and soo much merge/pickup conflict with last rev. i could try to resolve all conflict but i could make some errors and do a not good feeback =( by my fault, can you update code to last rev?

Link to comment
Share on other sites

  • 2 weeks later...

Hi all, here my feedback in about 1 week testing with default patch config:

Visibility.RelocationLoverLimit = 10

Visibility.AIRelocationNotifyDelay = 1000

And:

Visibility.GroupMode = 0

Visibility.Distance.Continents = 90

Visibility.Distance.Instances = 120

Visibility.Distance.BGArenas = 180

Visibility.Distance.Object = 100

Visibility.Distance.InFlight = 100

Visibility.Distance.Grey.Unit = 1

Visibility.Distance.Grey.Object = 10

MTMaps Actived? Not active for good CPU testing

Clean Core? No, some patches

Playerlimit to testing: 2000

Core Server (DB in other server): Intel Bi Xeon X5650 2 x 6 x 2 x 2.66+GHz - 24GB DDR3 ECC RAM - Ubuntu Server 9.10

Result:

HTOP CPU Usage with 2000 Players WITHOUT Visibility and Reloc simplified: 95 - 100% -> ~98%

HTOP CPU Usage with 2000 Players WITH Visibility and Reloc simplified: 75 - 98% -> ~87%

Max gain of CPU ~20%

Standard gain: ~11%

Minimal gain: ~2%

Some problem in gameplay detected by testers? No

Some problem in stability? No

Conclusion: The patch is really good and help soo much in CPU Usage

Best regards

Link to comment
Share on other sites

Hi ambal. Kero99 and me are now testing parallelizing client packet processing with mtmaps + TBB concurrent vectors + SQLAsyntask patch (implemented in [10865]) and maybe today or tomorrow we are going to start the branch 1 tests.

Since today we think that branch 2 is enought good! (Stable and increase performance as u can see in the kero99's feedback).

Kero99 will post the feedback from branch 1 as soon as posible.

Thank you 4 your work, we apreciate it!

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use