
“Monster Hunter World” game spends 25% of CPU time switching between threads - mintplant
https://steamcommunity.com/app/582010/discussions/3/1745594817439431537/?ctp=86#c1735462352461521093
======
mintplant
I'd appreciate any informed theories as to why this might be the case! The
r/Games thread which pointed me to this is full of non-technical explanations
of the concept of multi-threading and vague jabs at the developers for not
'optimizing' enough.

~~~
klowner
With 100 threads running like that, not only do you have the overhead of the
OS scheduling 100 threads to run on ~8 or whatever cpu cores, but also I would
assume these threads are all running different code, so there would be some
overhead with context switching / cache. Presumably these threads communicate,
so they're likely using some form of synchronization primitives.

Here's a pretty enjoyable video about how they handled this sort of engine
design problem using something sensible:
[https://www.gdcvault.com/play/1022186/Parallelizing-the-
Naug...](https://www.gdcvault.com/play/1022186/Parallelizing-the-Naughty-Dog-
Engine)

------
kbumsik
I wonder, what kind of tools can be used for profiling CPU performance while
playing a game?

~~~
rootw0rm
Intel VTune

~~~
kbumsik
That’s a great tool! Thank you.

------
mr_toad
Why we’re on the topic of bloated inefficiency, can we talk about steam’s
website?

Why does a company that takes 30% of PC gaming revenues need to add _70_
content trackers to their forums?

~~~
djajshgsjja
With no bosses, there’s nobody saying: “no, you have to use _this_ one.”

