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