[Question] Why are we getting the number of cores, rather than the number of logical processors? #9238
Labels
area-Infrastructure-coreclr
backlog-cleanup-candidate
An inactive issue that has been marked for automated closure.
no-recent-activity
optimization
Projects
Milestone
In our build script, we are calling
wmic cpu get NumberOfCores
: https://github.com/dotnet/coreclr/blob/5a01d8a39576f0d07441e4d123a90138f4ae0735/build.cmd#L323This seems like the wrong thing to be grabbing as it fails to return the proper number of cores for a machine with SMT (simultaneous multi-threading) support (machine will be under-utilized).
It will also report an incorrect number of cores if the user has disabled one or more cores via the UEFI/BIOS, or some other mechanism (machine will be over-utilized).
NumberOfCores
should likely be used in conjunction with one or more ofNumberOfEnabledCore
,NumberOfLogicalProcessors
, andThreadCount
.This will ensure that the processor is properly utilized based on its actual configuration.
The text was updated successfully, but these errors were encountered: