Windows Server and Processor Cores... (Part 1)
Published Sep 19 2018 02:39 PM 6,630 Views

First published on TechNet on Jul 30, 2012


Recently someone asked me of my thoughts on how Windows Server handles processor cores. With newer processors available with more than 2 or 4 cores each, it seemed like a good time to revisit this topic. If you have a system with multiple processor sockets and a few new processors with 2, 4, 6, 10, or more cores each…what should you expect Windows to do?


With use of multi-core processors becoming more prevalent in not only servers but desktops and maybe even your next cell phone or TV remote…it makes sense to review how Windows Server makes use of processors…since that is where you’re more likely to see higher densities of cores on a single physical processor.


Windows Server licensing is by processor socket (physical processor.) For example, say the edition of Windows Server you have indicates that it supports 4 physical processors. If you have dual core processors in four available processor sockets, that would provide 8 logical processors for the OS. If the processors also support Hyperthreading (HT) and the system has this option enabled, then the total logical processor count may then be 16. 16 processors as compared to 8…seems like a no-brainer to have twice as many, right?


Don’t confuse processor cores with extra logical processors available with HT enabled. Some configurations with HT might present one extra logical processor per core while others may present more. Cores and logical processors from HT are two different things and the expected performance may be different than expected. Additional processor cores are practically just like additional physical processors without requiring extra sockets for them on the system board.


The way I like to think of HT is to think of one of those old pizza shops where the pizza maker is tossing the dough in the air in preparation to make a pizza. You know…the old-fashioned way. Instead of being able to toss just one pizza at a time…imagine the same person tossing and spinning two of them simultaneously. Performance of this person compared to two separate people performing the same task may not be equivalent and may be somewhere in-between. For HT compatible processors that provide an extra logical processor per physical core, HT allows a processor core to run one additional concurrent thread per HT logical processor exposed but sharing on-chip resources like cache.


For purposes of illustration, assume you have a single core processor that supports HT and provides a single HT logical processor. In that configuration, both logical processors share resources on the chip. A HT processor typically will not provide the same performance as two single-threaded processors but may provide better performance than a single processor. With expected performance of a HT logical processor being somewhere in-between, the performance gains achieved in a HT configuration will vary by application. While I truly believe that HT on today’s hardware is better implemented and performs better than in years past, I don’t factor HT into sizing a system HT can be a good performance benefit to have on hand if you need it, but I’ve not seen the performance to be that much greater. I’ve consistently thought of HT as yielding more compute power than dealing with I/O.


You can search the net and find a variety of opinions on this topic. You may form your own opinion. There are also some applications that suggest or require disabling HT because of the impact to the application. The advice I’ve consistently given has been to size systems according to physical processors and cores. Then use Performance Monitor to determine if HT provides additional gain. And, of course, if an application says don’t use it…the vendor may have a reason.


How many cores then will Windows Server allow?


The number of possible logical processors prior to Windows Server 2008 R2 was based on the number of bits. For instance, a 32-bit OS could use 32 logical processors; 64-bit could use 64 logical processors. This is confirmed by Mark Russinovich’s presentation on R2’s kernel changes (available on the Microsoft Download Center.) Windows Server 2008 R2 extends this limit by allowing up to 4 groups of up to 64 processors each. Doing the math, that translates to a maximum of 256 logical processors for Windows Server 2008 R2. That alone would be enough for me to jump to R2 if I were an administrator using very expensive hardware with lots of processor cores…especially for virtualization.

The Windows Server 2008 R2 kernel establishes processor groups (K-Groups) at boot time; they are not customizable by an administrator after startup. However, according to KB2506384, there exists a way to manually adjust K-Group assignments to your liking for the next boot of the OS. K-Groups may contain one or more NUMA nodes. Windows attempts to place all processors from a given NUMA node in the same group where possible. Systems with less than 64 logical processors will have only a single group. From a scheduling standpoint, threads are assigned to only one group at a time. Also, an interrupt may target only the processors of a single group.


What happens when a physical processor has multiple cores or a given core has multiple logical processors?


The answer to this question depends on whether you're using Windows Server 2008 R2 RTM or with applicable updates that alter default behavior. Using the RTM version of Windows Server 2008 R2, the kernel attempts to place all cores of a given physical processor in the same group whenever possible. If using processors where the number of cores per chip isn’t an even multiple of 2, then some cores on a physical processor may be split between groups. For example, if using 12 processors with 6 cores each, the total number of processor cores would be 72. This would result in one group of 64 processors, and a second group of 8. The eleventh physical processor would have 4 cores in the first group, with the remaining two cores the second group along with all six cores of processor 12. For some applications, uneven groups can be problematic. Additionally, minor hardware differences between seemingly identical systems could result in one with a {64,8} grouping and another with {8,64}.


If using Windows Server 2008 R2 with KB 2510206 (or future service pack containing this update), the kernel will attempt to balance processors amongst groups. With the preceding example of 72 logical processor cores, the resulting groups would each contain 36. The update provides predictability and balance without requiring manual K-Group specification as per KB2506384.


If using Windows Server 2008 with more than 64 cores, you would not be able to utilize extra cores above that limit even though they may exist. Windows Server 2008 R2 can utilize processor groups and allow use of these additional cores up to the maximum of 256. This isn’t the only reason to consider moving to Windows Server 2008 R2…there certainly are many more.


Additional References


2510206 Performance issues when more than 64 logical processors are used in Windows Server 2008 R2


2546706 A Windows Server 2008 R2-based computer that has some NUMA-based processors and more than 256 logical processors runs in SMP mode as a 64-processor system and may experience decreased performance


2517752 "0x0000000A" Stop error occurs during the shutdown process on a computer that is running Windows Server 2008 and that has more than 64 processors installed


Sysinternals CoreInfo tool can show logical processor to physical processor mapping


Version history
Last update:
‎Feb 07 2020 10:50 AM
Updated by: