Jump to content

[11193][performance] Visibility updates and relocations


Recommended Posts

Posted

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..

Posted

Guys, I suggest you to not miss this patch as it is essential to greatly improve mangos performance :rolleyes: Test branch2 first since we need to know how bigger the bonus it gives + it does not have issues with fast moving objects like branch1 does.

Posted

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?

  • 2 weeks later...
Posted

Any test results on this patch? Anyone? Guys, this piece of code is very important for us and will bring massive bonuses to core performance, why noone interested in submitting feedback? :(

Posted

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

Posted

Nice results, kero99, thank you very much :) Is patch in branch 1 can be applied for tests? We just want to see the difference in CPU usage between these two to decide what parts might be improved.

Cheers :D

Posted

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!

Posted
Since today we think that branch 2 is enought good

Thank you, Undergarun, for making tests. We need numbers to compare performance of both patches before we decide if branch 2 can be improved ;)

  • 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