Multi-processor support and .Net

Core support in Windows is tied to the notion of processor groups. For historical reason, a group is made of up to 64 cores (related to affinity mask).

Until version 4.0, .Net was only using first group (ref.), thus allowing up to 64 cores but statring with 4.5, .Net optionnaly support using more than one group for TPL as answered by Stephen Toub:

“The default TPL TaskScheduler targets the .NET ThreadPool.  By default, the pool is restricted to a single processor group (, and thus to 64 cores.  However, in .NET 4.5 you can set the <Thread_UseAllCpuGroups enabled=”true”/> flag. When your computer has multiple CPU groups, enabling this element causes the runtime to distribute managed threads across all CPU groups rather than being limited to just one, and thus the default scheduler can target whatever the OS supports.  (GCCpuGroup must also be enabled for this setting to take effect.)”

This library can be usefull if more than 64 cores should be taken inti account: Multi-Processor Extensions for .NET – Home. This C++/CLI use umnanaged Win32 API to provide missing group informations.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s