4 ms·
Can gaming workloads simulate the 100% of all cores that a parallel large scale native C++ compilation will generate?
by PaulDavisThe1st 6y ago
Can gaming workloads simulate the 100% of all cores that a parallel large scale native C++ compilation will generate?
- m12k 6y agoModern game engines can, yes
- zamalek 6y agoGames are typically written in C++, so that's a yes. As for the threading, older (2yr or so back) games tend to assume 4 cores and don't scale past that (thanks, Intel!). More recent games tend to aim at arbitrary horizontal scaling. You do still get major titles that are completely single-threaded.
- fomine3 6y agowritten in C++ not means it's compatible workload. Gaming performance is just gaming. For gaming, realtimeness is important and normally single thread perf is important even though some process is multithreaded.
- moonchild 6y ago? no The parent was talking about c++ compilation. A c++ compiler is very different from a game engine written in c++.
- anfilt 6y agouh what??? No most games do no scale like compilation does. For instances when compiling a large program GNU make lets me the following: make -j 16 That will create 16 instances of the compiler each compiling different compilation units. I could even do the following: make -j 128 and that will spawn a 128 processes, and still scale. I can keep scaling this assuming I have enough compilation units (aka files)
- zamalek 6y agoGames use threads.
- PaulDavisThe1st 6y agoCompilation parallelism is generally bounded roughly the number of independent compilation units. For my main codebase, that is in excess of 1200. That is, on a system with 1200 cores, I could use all 1200 cores productively, at full capacity (ignoring disk i/o waits) [1] My impression is that few games (if any) can ever approach this level of potential parallelism. There are not many tasks in computing with this level of "embarrassing parallelism". [1] somebody actually did this with Ardour once, on a system with 1024 cores. The current normal-system compile time record for the software is a little under 5min (Ryzen Threadripper 2950X + 64GB of RAM). The k-core system completed the build in less than 10 seconds :)
- pdimitar 6y agoSurprised that the record doesn't belong to a 32-core CPU, hmm. Quite interesting. Any data on the precise machine specs that did the record? I'm talking about the TR 2950x one, not the custom-built many-core machine. I'd be interested mostly in motherboard and RAM speed.
- zamalek 6y ago> My impression is that few games (if any) can ever approach this level of potential parallelism. Which is embedded in my first comment on game multithreading: "older" games assume 4 cores, some are single-threaded.
- anfilt 6y agoThis has no bearing on how new the engine is. The workloads scale much differently when it comes to parallelism. While it might possible to get a little more parallelism and concurrency with a newer engine. The ability to scale is much more limited for games.
- 6y ago
- anfilt 6y agoIf the game has a CPU bounded work load that scales well across multiple threads/processes. Honestly, most games do not, and are likely gonna run into Amdahl's law much quicker than compilation.