1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice

of cars, cores and threads

Discussion in 'General Discussion' started by MuzzleVelocity, Mar 30, 2016.

  1. MuzzleVelocity

    MuzzleVelocity
    Expand Collapse

    Joined:
    Mar 3, 2016
    Messages:
    46
    hi all,

    I've been reading the forums, but info on this topic seems conflicting or outdated.


    So, does each vehicle get assigned a separate core, or a separate thread? Or does that mean the same thing?


    I'm running a quad core i5 if that makes any difference... Thanks!
     
  2. simonfrat123

    simonfrat123
    Expand Collapse

    Joined:
    Jun 16, 2015
    Messages:
    331
    each vehicle runs on one core, the semi runs on 2 cores, and if the car has a trailer it runs 2 cores, something big like the Belaz run on 6 cores I am not sure about the belaz.
     
  3. BlueScreen

    BlueScreen
    Expand Collapse

    Joined:
    Apr 5, 2014
    Messages:
    624
    Each vehicle gets its own software thread which is assigned to the first available CPU thread. If the amount of vehicles is greater than the amount of CPU threads, multiple vehicles will be assigned to a single CPU thread, each with its own software thread. If that's confusing:
    • A CPU core is a physical component of the CPU. For example an i5 CPU (desktop) has 4 physical cores, while an i3 has 2. More cores allow for better parallel processing.
    • A CPU thread is a virtual 'core'. The OS works with threads, assigning processes to CPU threads. Usually the number of CPU threads is the same as the number of physical cores, but hyperthreaded CPUs (i3, i7, laptop i5) have two threads per physical core. This provides better multitasking capability. While it also helps maximise usage of physical cores (by allowing each core to process two threads simultaneously), the performance of a single thread will be slightly worse when both of a core's threads are under heavy load.
    • A software thread is a single processing 'stream' for software. There is no limit to the number of software threads that can be run and many software threads can and do run on a single CPU thread.
    Completely false, no vehicles run on multiple threads. Engine can't do that. Trailers are considered part of a vehicle and therefore run on the same thread, unless they are a separate vehicle (which afaik does not exist).
     
    • Like Like x 1
  4. amarks240

    amarks240
    Expand Collapse
    Guest

    This has been explained before but your thread title is bad ass so we'll let it slide.
     
  5. MuzzleVelocity

    MuzzleVelocity
    Expand Collapse

    Joined:
    Mar 3, 2016
    Messages:
    46
    Thanks BlueScreen, that clears it up.

    I guess some people hear that each vehicle gets its own "thread" (which is true), and assume this to mean "CPU thread", which would indeed mean one core per vehicle. But its more accurate to say each vehicle gets a SOFTWARE thread, which has nothing to do with cores...
     
  6. BlueScreen

    BlueScreen
    Expand Collapse

    Joined:
    Apr 5, 2014
    Messages:
    624
    Normally each vehicle does get a CPU thread, not entirely dedicated to it (Windows can run other stuff on it too) but not used for other vehicles - that is, as long as there aren't more vehicles than CPU threads, in that case some threads will have to run 2 vehicles.
     
  7. TheMohawkNinja

    TheMohawkNinja
    Expand Collapse

    Joined:
    May 18, 2014
    Messages:
    209
    Wait, I thought software threads were referring to the CPU threads? Like, when you designate two software threads, you are telling the CPU to run the program on two of it's threads.
     
  8. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,958
    completely and utterly false. Not even one word of truth in there
    --- Post updated ---
    no. You get no choice when programming for windows on which core a program runs. You can break it down into software threads, the windows task scheduler then chooses which of the hundreds of software threads your pc has running to run on which cores and for how long each.

    beamng vehicles are software threads. Ones with high demand so windows will try to run them each on their own core where possible which is where people get the beamng vehicles run in their own core thing from. In reality windows does not expose a mechanism for me as a software developer to determine that this thread must run on this core etc
     
    • Like Like x 1
  9. simonfrat123

    simonfrat123
    Expand Collapse

    Joined:
    Jun 16, 2015
    Messages:
    331
    don't say "not even one word of truth in there" bacause people make mistakes
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice