In Delphi, we need to know the number of CPUs for parallelization. Until now, we have used the GetNativeSystemInfo()
function, which has worked fine, also with servers with hyperthreading.
But now, we have a server (Intel Xeon Gold 6230) with 40 physical processors and 80 logical processors with hyperthreading, and GetNativeSystemInfo()
only shows 40 CPUs.
We made a small test program that uses 3 calls:
GetNativeSystemInfo()
GetLogicalProcessorInformation()
(code from How to detect number of logical and physical processors efficiently?)And looking into the Registry for number of CPUs:
Computer\HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor
For all of our servers, these 3 calls give the same number of CPUs:
But for the Intel Xeon, only the Registry gives us the 80 CPUs:
Does anybody know why it is not working for the Intel server, or know a way to be sure to get the max number of CPUs?