Multithreading... GET ONBOARD DEVELOPERS!

Discussion in 'Games, Gaming & Game-demos' started by Lex Luthor, Mar 26, 2023.

  1. Lex Luthor

    Lex Luthor Master Guru

    Messages:
    781
    Likes Received:
    356
    GPU:
    RTX 3060
    Hello, just wanted to promote subject and give an example of a recent developer of a complex simulator that implemented multithreading. Also a little promotion for ReShade too... helps me see the planes better! Title just attention getting, overall things good ; )
    O7



     
  2. Reclusive781

    Reclusive781 Ancient Guru

    Messages:
    2,654
    Likes Received:
    1,065
    GPU:
    RX 7800 XT
    Aren't most modern games made the last 8 years multi-threaded though?
     
  3. Lex Luthor

    Lex Luthor Master Guru

    Messages:
    781
    Likes Received:
    356
    GPU:
    RTX 3060
    Good question... I wouldn't say most, but I don't know the statistics so I'll say many games that are popular could benefit from multithreading that don't currently have it (8yr's.... I'd bet no....). And not just games, Slicers, some CAD and other programs can benefit.
    May look up statistics but will give other folks time to post.... and I may be full of it... lol, wouldn't be the first time!
     
  4. skacikpl

    skacikpl Maha Guru

    Messages:
    1,229
    Likes Received:
    609
    GPU:
    Inno3D RTX 4090
    Literally every modern engine utilizes multithreading to some extent. It's just not always efficient due to logistics of having to synchronize threads between each other so essentially MT is used to handle surrounding tasks like audio/streaming/rendering prep but technically core game will always run on a single thread and that's the main bottleneck of any engine, since it's hard to split and synchronize actual game code across different threads and already split things have to eventually synchronize with that thread.
     
    Reclusive781 likes this.

  5. Zenoth

    Zenoth Maha Guru

    Messages:
    1,407
    Likes Received:
    335
    GPU:
    MSI RTX 3080 12GB
    Back when Dual / Quad Cores were coming (especially around Quads) I recall people (not 'experts', but mostly gamers) were thinking that it would forever change the industry. In their mind (and in my mind at the time, too) it meant that - for instance - one 'core' would be responsible for A.I., another core would take care of animations / motions (anything that moves), another core for Physics, etc. That's definitely not how it went.

    In fact, I recall making a thread very long ago (probably not even here) where I asked around where were the "CPU Options" in our games?

    Meaning: when you go in your games' options screen, we'd have our typical Audio / Controls / Video / Graphics options. But CPU-related options never happened.

    What I had in mind would have been, for example:

    1) If the game is made at a time when, let's say, 8 Cores / 16 Threads are standard (even in consoles, for the lowest common denominator reference in most game studios, from which they'd make their games) then enhance said game for users who happen to have a computer with that sort of CPU. In this case, "enhance" the game would be Better A.I. (A.I. would use better tactics against, or with the player in the case of Co-operation game modes), more Wild Life roaming around in an open world (or wild life with better A.I., doing more things than 'default'). Could be more particle effects in shooters or whatnot, or better / more destructible environments, etc.

    2) It would be the same, ultimately, as going from Low, Medium, High and Ultra, but for CPU Options (and those tweaks would simply enhance the game in various ways because you paid more money to get that shiny CPU with that many Cores on it).

    THAT is how I pictured the 'future of games' back when Duos and Quads were coming out. I guess I was extremely imaginative and very naive.
     
  6. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,645
    Likes Received:
    13,646
    GPU:
    GF RTX 4070
    If process has more than one thread it is multithreaded. Questions are:
    - what those threads do?
    - are they pinned to specific cores or spread across several cores?
     
    Last edited: Mar 27, 2023
    Airbud and Lex Luthor like this.
  7. Dragam1337

    Dragam1337 Ancient Guru

    Messages:
    5,535
    Likes Received:
    3,581
    GPU:
    RTX 4090 Gaming OC
    There usually are settings that affects cpu usage in cpu intensive games... crowd density, LOD distance, and stuff like that...
     
  8. Dragam1337

    Dragam1337 Ancient Guru

    Messages:
    5,535
    Likes Received:
    3,581
    GPU:
    RTX 4090 Gaming OC
    Some do near perfect scaling with threads though... battlefield 5, or cyberpunk for instance... then you have games like witcher 3 remastered or flight simulator, which just hammers 1 or 2 threads, and lightly uses the rest.

    I'd like to see all games taking full advantage of the cpu's like the aforementioned games.
     
    Lex Luthor likes this.
  9. pegasus1

    pegasus1 Ancient Guru

    Messages:
    5,213
    Likes Received:
    3,626
    GPU:
    TUF 4090
    MT makes a huge difference in DCS, not perfect yet but allows for making more expansive missions in the editor.
     
    Airbud and Lex Luthor like this.
  10. Lex Luthor

    Lex Luthor Master Guru

    Messages:
    781
    Likes Received:
    356
    GPU:
    RTX 3060
    Good questions and yea, the DCS multiplayer missions with servers running 24 hour plus long missions nice!

    Now to add fuel to the fire... ; )
    If you look at (pause) the MT vs ST vidy where the task manager shows each thread usage.... umm... not really much different and many would call the stock DCS multithreaded by looking at the task manager....

    So what really is multithreading?.... a developer making a coding improvement and giving it a name?

    So DCS an overall cpu usage increase by 10%ish and doubleish fps.

    Unlike 3D printing where you can print the slice faster than you can slice the cad! (this is a joke.... but pointed ; )

    Just interesting topic imo.
     
    Airbud and pegasus1 like this.

  11. pegasus1

    pegasus1 Ancient Guru

    Messages:
    5,213
    Likes Received:
    3,626
    GPU:
    TUF 4090
    yeah i noticed the same thing with monitoring software, maybe they have just made the engine more efficient. For certain though my 4090 works harder under MT than under ST.
     
    Airbud and Lex Luthor like this.
  12. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,645
    Likes Received:
    13,646
    GPU:
    GF RTX 4070
    When code is split/distributed among several threads.
    Thread is OS construct (the flow of CPU instructions which can be scheduled for execution).
    Each process by default (upon start) has one - main - thread.
    Developer can create/obtain (from OS) additional threads to do something aside of main thread.
    In principle multithreading can do parallel actions and/or asynchronous actions.

    PS And all of that is correct even on single core CPU because of preemptive multitasking in OS.
     
    Airbud and Lex Luthor like this.
  13. pegasus1

    pegasus1 Ancient Guru

    Messages:
    5,213
    Likes Received:
    3,626
    GPU:
    TUF 4090
    I think it was a rhetorical question as the game he is talking about, DCS, has just had a massive update enabling Multi Threading and there are some huge improvements, but monitoring software doesnt really show any more cores being used.
     
    Lex Luthor likes this.
  14. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,645
    Likes Received:
    13,646
    GPU:
    GF RTX 4070
    I suspect the number of cores used is not major question of multithreading. It can be that two cores are enough for good parallelism if cores are not at 100% of usage.
    Spreading the threads across as many cores as possible is relevant only if any thread creates heavy load.
    But there is the question of cache hit/miss - the penalty for cache miss can be huge.
     
  15. Carfax

    Carfax Ancient Guru

    Messages:
    3,972
    Likes Received:
    1,462
    GPU:
    Zotac 4090 Extreme
    Multithreading in games has evolved much over the years. The first iteration was quite basic, having particular tasks like rendering, audio, decompression, physics run on particular cores. But now, it's much more sophisticated. The most well threaded engines these days use a task based system, which break up various tasks or work and spread them across multiple threads. So a game's physics calculations could be running on the same thread as decompression/streaming and audio. I remember reading about this years ago, and I think it came to prominence in the PS4/Xbox One era as those consoles had weak CPUs and had to be exploited to the max to get any worthy performance.

    All the best 3D engines use this system though. I know for a fact that Id Tech 7 in Doom Eternal does, as it has no lead rendering thread. The rendering task itself is broken up and run across multiple threads, leading to much better CPU utilization and performance.
     
    BlindBison likes this.

  16. Lex Luthor

    Lex Luthor Master Guru

    Messages:
    781
    Likes Received:
    356
    GPU:
    RTX 3060
    "...multithreading can do parallel actions and/or asynchronous actions..."

    Very good statement to think about ; )
    And very correct : )
     
  17. I dunno what's the point of this thread. Game developers have been "onboard" multithreading for more than a decade... since Xbox360 era.
     
  18. Lex Luthor

    Lex Luthor Master Guru

    Messages:
    781
    Likes Received:
    356
    GPU:
    RTX 3060
    Well maybe it has a point to some people. You been around almost as long as me, why the comment if not interested in discussion about it?
     
    pegasus1 likes this.
  19. BlindBison

    BlindBison Ancient Guru

    Messages:
    2,420
    Likes Received:
    1,146
    GPU:
    RTX 3070
    DOOM Eternal and 2016 before it were both very impressive PC releases. Great games too
     
    Airbud and Carfax like this.
  20. pegasus1

    pegasus1 Ancient Guru

    Messages:
    5,213
    Likes Received:
    3,626
    GPU:
    TUF 4090
    Maybe dont bother reading it then, maybe theres no point in the "give me a like for no reason" thread but its popular.
    Its a technical forum and people like to discus technical things, well most people do, if not then maybe go to Reddit.
     
    Airbud likes this.

Share This Page