I can't get 100% CPU utilization when compiling a large C++ project (many files) using Visual Studio 2015.
When setting the compiler /MP
flag, I get low CPU utilization:
When setting /MP32
I get better results, but still not the desired full utilization:
I should mention that the current OS is Windows Server 2012 R2, which was originally installed on a VM image. Recently we started using this machine instead the VM, so the disk image was copied here. Perhaps the compiler is getting confused about how many cores are actually installed?
Edit: I noticed that the "NUMBER_OF_PROCESSORS" environment variable was 16, and not the expected 32. I switched the "NUMA Group Size Optimization" BIOS to "Flat", as advised here, and the NUMBER_OF_PROCESSORS variable now shows 32. The utilization is still not full - now I get ~70% when building this project (same result as setting /MP32
manually).