Changes between Initial Version and Version 1 of WinMulticore


Ignore:
Timestamp:
Oct 25, 2019, 3:27:21 PM (5 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WinMulticore

    v1 v1  
     1= Supporting Windows computers with > 64 cores =
     2
     3On Windows machines with > 64 cores,
     4the cores are divided into "processor groups".
     5A given process runs in a particular process group,
     6inherited from its parent.
     7
     8Docs on this:
     9
     10https://docs.microsoft.com/en-us/windows/win32/procthread/processor-groups
     11
     12https://docs.microsoft.com/en-us/windows/win32/procthread/what-s-new-in-processes-and-threads
     13
     14https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setprocessaffinitymask
     15
     16Unpleasant, but we're stuck with it.
     17
     18Currently, the client doesn't do anything related to processor groups,
     19and apps run in processor group 0.
     20This means that on (say) a 256-core machine,
     21BOINC will run 256 single-threaded apps,
     22but they'll all run on the same 64 cores.
     23This is bad.
     24
     25Proposed development:
     26
     27== Phase 0 ==
     28
     29On startup, get and print processor group info.
     30
     31== Phase 1 ==
     32
     33As the client runs apps, it assigns them to a processor group,
     34and keeps track of how many free cores each processor group has.
     35The assignment policy: run the app in the group that has enough free cores,
     36and for which the number of free cores is smallest.
     37This will tend to run multicore apps in their own process groups,
     38and sequential apps in other groups.
     39
     40Note: the server doesn't know about processor groups.
     41It may send jobs that want to use 256 cores.
     42These will end up running as 256 threads on 64 cores.
     43
     44== Phase 2 ==
     45
     46Send processor group info to the server,
     47which can use it to set the # of threads for multicore apps.
     48
     49== Notes ==
     50
     51 * We're not going to use processor affinity.
     52  If a job runs in a processor group,
     53  its affinity mask is all the processors in that group.
     54
     55* It's possible for applications to create threads in multiple processor groups,
     56  e.g. to use all 256 cores.
     57  For now, we'll assume that applications don't do this.