This object is in archive! 

Performance: Constant 50% core load by VRage.EOS.MyP2PQoSAdapter.UpdateStats

Guest shared this bug 2 years ago
Reported

Game version: 1.200.025

Method: VRage.EOS.MyP2PQoSAdapter.UpdateStats

Problem: Constant ~50% load on a single CPU core because of the above method. It is constantly running in its own thread, repeatedly called from a loop. It is especially bad for players with 4 or less CPU cores. It is bad anyway, since it is trashing the CPU cache and heap (GC pressure!), lowering its overall throughput of all the other threads.

How to reproduce:

  1. Start any game (it can even be an offline one!)
  2. Monitor the CPU consumption of methods/threads with a profiler, like dotTrace
  3. Find the thread constantly running the above networking code
  4. Notice the constant CPU load

Please see the attached dotTrace screenshot for reference. A 10 seconds long capture was taken while standing still in an almost empty offline world with only a single grid in it. (No planets, empty space only.) A CLR worker thread is ~50% loaded all the time. You can see the above method in the tree opened on the right, 2 lines above the blue row.

As a workaround I replaced 98% of those calls with Thread.Sleep(1) in the Performance Improvements plugin. According to actual player feedback it improves the overall smoothness of the game while playing in worlds populated with many grids. Certainly I'm aware, that it is not a proper fix.

Please feel free to reach out in case of questions.

Replies (1)

photo
1

Hello, Viktor,

thanks for letting us know. Issue was reported internally.

Kind Regards

Keen Software House: QA Department

Leave a Comment
 
Attach a file