This object is in archive! 

Multithreaded calculation of physics and game engine

Артём Черных(Artika) shared this feedback 2 years ago
Not Enough Votes

In the game at the moment, all physics, damage calculations, the work of turrets, miscalculations of factories and so on are calculated on one core. It's not strange, even when playing on the server, my 6-core processor is not loaded in almost any way, except for one core that is loaded at 80%, against 2-3% on the rest. On the server, this situation looks even sadder. When playing more than 20 players, calculating all the server physics in one thread for say Xeon E5 2689 becomes a problem, and considering that all this is on one core, the rest are idle. If you open the load on the cores, then we observe this picture. The game engine constantly uses 1 core that counts all actions on the server, the rest at this time count some remaining actions that do not particularly help unload the main thread. Thus, it turns out that if we have 2 conditional servers, the load will be on 2 cores, and the remaining 14 threads will just rest (with 8 cores / 16 threads). Accordingly, we get problems with simulation on the server at not particularly high processor frequencies. Although it would seem that the processor can provide this due to the number of cores, but alas. The situation in the game on the client side is absolutely identical.

( The first two images, the load on the server processor during server operation without players ( PS: during server operation, the numbers there are even worse ) )

(The second image and the third is the load on my 6 core processor while playing in my local world)


I hope you won't leave this unnoticed, because at the moment it doesn't make sense to buy multi-core builds for a server or a player, you just need a frequency. But at the same time, it does not get rid of lags during the game)

Leave a Comment
 
Attach a file