How logical and physical finders work
mainThe FinderRegistry provides two ways to retrieve pre-configured lists of finders:
CpuCoreCounter::getDefaultLogicalFinders(): Returns an ordered list of finders that look for logical CPU cores (the default behavior).CpuCoreCounter::getDefaultPhysicalFinders(): Returns an ordered list of finders that look for physical CPU cores.
// Use physical finders instead of logical ones
$finders = CpuCoreCounter::getDefaultPhysicalFinders();
$counter = new CpuCoreCounter($finders);
$physicalCores = $counter->getCount();