Are there any plans to allow DCS to use multiple cores? - Page 5 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 06-15-2019, 11:55 PM   #41
dorianR666
Member
 
Join Date: Jan 2019
Posts: 113
Default

Quote:
Originally Posted by etherbattx View Post
Vulkan is always the answer.

Vulkan forever.
vulkan wont do much at all. vulkan doesnt magically transform a single-threaded simulation into multi-threaded simulation.


it only lowers rendering API overhead and allows to send commands to GPU in a multi-threaded manner. however rendering is only a tiny portion of what the game does in the main thread, so increase in performance will be marginal.


what needs to be separated into other threads is physics and AI.
__________________

CPU: AMD Ryzen 5 1600X
GPU: AMD RX 580
dorianR666 is offline   Reply With Quote
Old 06-16-2019, 12:18 AM   #42
etherbattx
Member
 
Join Date: May 2018
Posts: 547
Default

Quote:
Originally Posted by Fri13 View Post
Quote:
Originally Posted by etherbattx View Post
they already use 3 or 4, but there is nothing preventing them from using more.

the trick is finding tasks that can be offloaded without adding latency and locking.

it’s not easy and most sims don’t do it, either.
Only two cores.
1-core for audio
1-core for everything else
i don't think that's correct. and you can't really think of "cores" when it comes to an executing process. it's more about the "threads".

in modern operating systems, an application creates and uses a thread for it's execution. some apps create one, some create 200+.. but in either case, the "thread" is the unit of execution. the "core" is just a compute resource where the thread executes or "runs".

if you launch DCS and let it go for a while and look at the threads (units of work, which get assigned to 'run' on a core), you will see that there is around 50 different threads for the DCS process.

if you examine the total execution time for each thread, you will see that while most are idle, some do real work. in my multiplayer caracas test case:
34 threads didn't do much at all (almost no execution time)
13 threads "ran" for more than 1% of the total DCS process execution time
3 threads consumed more than 73% of the process execution time (38%, 23% 12% each)

given the data, we can see that DCS used 13 threads (out of 50) to do the work of the sim, and 3 of those threads were doing the bulk of the work.

it doesn't make sense that one core does "audio", and one does "everything else".
there is a lot more going on than that.

in any case, those threads will be assigned to a physical "core" when they are "ready" to run. if you only have a single core machine, all those threads will be assigned to that single core and be forced to run serially, one after the other. but if you let windows do it's job, it will assign as many "ready" threads to run as it can, onto any of the available free cores.

so, those 3 main threads do a lot of work. and the 10 other active threads do work too (but less). and that means there are 13 threads that will be scheduled onto cpu cores every time they are "ready" to run.

so rather than saying DCS "only uses 2 cores, 1 for audio and 1 for everything else", i would say DCS uses 3 'main' threads heavily and 10 quite a bit less often. and for sure you don't want 13 threads running on a 2-core Core-Duo chip.

DCS is not just a 2 core sim, it's definitely more.

Last edited by etherbattx; 06-16-2019 at 04:42 AM.
etherbattx is offline   Reply With Quote
Old 06-16-2019, 02:16 AM   #43
Weta43
Veteran
 
Weta43's Avatar
 
Join Date: Feb 2005
Location: Aro Valley Wellington New Zealand
Posts: 6,896
Default

Also - & I'm a bit sketch about this - there's only one floating point calculator per physical core, so if you see 4 logical cores, you've only got 2 floating point calculators.
If you split some type of jobs up over too many threads, they just end up waiting for that resource.

case in point - I run a simulation at work on machines that have 44 (2 x 22) physical cores, and show as having 88 logical cores (& 256GB RAM).

We can specify how many cores to use, and which processor core to allocate them to.
Performance improves linearly as you spread the jobs over cores (44 cores takes 1/2 the time that 22 does), but caps out at 44. assigning 88 'cores' is no faster than assigning 44 because the threads just end up waiting for the numeric processor.

It may be that on home PCs with until recently 2 or 3 physical cores, there wasn't much point in trying to multi-thread beyond splitting out the sound (& perhaps some AI logic)
__________________
Cheers.
Weta43 is offline   Reply With Quote
Old 06-16-2019, 09:44 AM   #44
Worrazen
Member
 
Join Date: Oct 2014
Location: Slovenia, Europe
Posts: 848
Default

Quote:
Originally Posted by etherbattx View Post
i don't think that's correct. and you can't really think of "cores" when it comes to an executing process. it's more about the "threads".

in modern operating systems, an application creates and uses a thread for it's execution. some apps create one, some create 200+.. but in either case, the "thread" is the unit of execution. the "core" is just a compute resource where the thread executes or "runs".

if you launch DCS and let it go for a while and look at the threads (units of work, which get assigned to 'run' on a core), you will see that there is around 50 different threads for the DCS process.

if you examine the total execution time for each thread, you will see that while most are idle, some do real work. in my multiplayer caracas test case:
34 threads didn't do much at all (almost no execution time)
13 threads "ran" for more than 1% of the total DCS process execution time
3 threads consumed more than 73% of the process execution time (38%, 23% 12% each)

given the data, we can see that DCS used 13 threads (out of 50) to do the work of the sim, and 3 of those threads were doing the bulk of the work.

it doesn't make sense that one core does "audio", and one does "everything else".
there is a lot more going on than that.

in any case, those threads will be assigned to a physical "core" when they are "ready" to run. if you only have a single core machine, all those threads will be assigned to that single core and be forced to run serially, one after the other. but if you let windows do it's job, it will assign as many "ready" threads to run as it can, onto any of the available free cores.

so, those 3 main threads do a lot of work. and the 10 other active threads do work too (but less). and that means there are 13 threads that will be scheduled onto cpu cores every time they are "ready" to run.

so rather than saying DCS "only uses 2 cores, 1 for audio and 1 for everything else", i would say DCS uses 3 'main' threads heavily and 10 quite a bit less often. and for sure you don't want 13 threads running on a 2-core Core-Duo chip.

DCS is not just a 2 core sim, it's definitely more.
We only say that for the sake of communicational convenience, you're absolutely correct. There's a ton of more detail in that past forum thread. The other threads just weren't contributing as much so we didn't talk about them.

They are referring to my tests from I think more than a year ago now, if I remember correctly that test may have had one potentially fatal flaw in that it wasn't stressing out DCS but instead it was very barebone, however I did a lot of stuff at the time so I don't remember if that's true or not for the WPA tests, I did a video where it was barebone, no action, no flight, no airplanes, no terrain movement, raw rendering and audio, I fiddled with affinity and very clearly saw how enabling the second core had an big effect, while enabling the third core not so much, only 2-3 FPS. At least it proved that audio does take a good chunk and it's working right, so technically it is multi-threaded already in that sense if you use the english meaning of multi ... if it matters at all for me naturally that wouldn't be multi, because the concept of duality is strict with no exceptions in my language.

I did a brief test now but I'm still preparing, majority part of the time it takes is learning how to use WPA and creating a proper custom mission inside DCS, then it'll take some more time to do the screenshots all over again with in depth explanation so a totally non-tech person can understand it, and I saw 2 more threads doing ~15% if I'm not mistaken each but this is all grain of salt as I was just browsing through the graphs, ofcourse you can as well do it yourselfs if I'm not fast enough, it's a moment when I'm also busy with other stuff, otherwise I would have done it already last week.
__________________
DCS-Setup: Win10 x64 1607, 1440p@75"32, MOBO: Asus P9X79, CPU: Intel Core i7 3820 4.0GHz, GPU: Radeon RX 480 8GB, 24 GB RAM @ 1333 Mhz, DCS on SSD Samsung 860 EVO 250GB, Saitek Cyborg X/FLY5 joystick.

Last edited by Worrazen; 06-16-2019 at 06:14 PM. Reason: wording
Worrazen is offline   Reply With Quote
Old 06-16-2019, 05:16 PM   #45
etherbattx
Member
 
Join Date: May 2018
Posts: 547
Default

i’ve tested in single player and multiplayer
with monitor and with VR,

and DCS always uses multiple threads and more than 2 cores.

4 cores seems to be the sweet spot, but the details don’t really matter, since all modern cpu’s have at least 4 cores.
etherbattx is offline   Reply With Quote
Old 06-16-2019, 06:20 PM   #46
Berniyh
Junior Member
 
Join Date: Dec 2015
Posts: 94
Default

Quote:
Originally Posted by etherbattx View Post
they already use 3 or 4, but there is nothing preventing them from using more.

the trick is finding tasks that can be offloaded without adding latency and locking.

it’s not easy and most sims don’t do it, either.
Actually there are quite a few sims that can do it.
And the separation is usually graphics/main, physics, AI and maybe audio (so that'd be 4 threads, but possibly more if you split AI and physics onto multiple cores each).


On the commercial versions of the sims they often offload the physics calculation to a second computer even.


No idea though how it's done on DCS.
Berniyh is offline   Reply With Quote
Old 06-17-2019, 01:42 AM   #47
JimmyWA
Junior Member
 
JimmyWA's Avatar
 
Join Date: Mar 2017
Location: Perth, Australia
Posts: 78
Default

Quote:
Originally Posted by Tom Kazansky View Post
Anyone else out there to confirm this?


I'm using stable DCS. Just curious.
After the latest update DCS.exe now defaults (on my PC at least) to use all cores! Thank you ED!
__________________
i7 6800k OC 4 Ghz, 16 GB DDR4 OC 3200 mhz, GTX 1080, Water cooled, C: NVME SSD, F; DCS on SSD TM HOTAS Warthog Stick & Throttle, CH Rudder Pedals, 2 x Thrustmaster MFDs, HTC Vive
JimmyWA is offline   Reply With Quote
Old 06-17-2019, 07:55 AM   #48
Mr_sukebe
Senior Member
 
Mr_sukebe's Avatar
 
Join Date: Jan 2016
Location: England
Posts: 1,418
Default

Just a thought on this.
If you take a scan at the resource usage when running a dedicated server, it's generally very low, i.e. rarely more than 50% of a single CPU core (now the fix is in) and around 4GB of ram.
That suggests to me that the majority of the processing for DCS is NOT being taken up by core logic, but by supporting the graphics.
So if Vulkan will help spread the load across multiple CPU cores for the graphics side of things, then maybe we don't need to worry about parallel processing of game logic.
__________________
System: 9700, 64GB DDR4, 1080, NVME2, Rift S, Jetseat, VPC HOTAS, MFG crosswinds, custom button box, Logitech G502 and Marble mouse.
631 Squadron Server: i5 2500@3.9Ghz, 24GB DDR3, SSD.
Mr_sukebe is offline   Reply With Quote
Old 06-17-2019, 08:27 AM   #49
Tom Kazansky
Member
 
Tom Kazansky's Avatar
 
Join Date: Oct 2018
Location: Germany
Posts: 270
Default

Quote:
Originally Posted by JimmyWA View Post
After the latest update DCS.exe now defaults (on my PC at least) to use all cores! Thank you ED!

Ty. That's good news.



Does this support depend on certain maps?



Or is the OP's question answerd by that?
Tom Kazansky is offline   Reply With Quote
Old 06-17-2019, 10:30 AM   #50
VitS
Junior Member
 
Join Date: May 2019
Posts: 29
Default

Vulkan is actually pretty bad for smaller game studios. Sure, it's amazing for studios that focus on game engines. It offers little gain over dx12 but requires tons of expertise.

Last edited by VitS; 06-17-2019 at 10:48 AM.
VitS is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 03:00 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.