Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many processor cores does the .NET task scheduler support

Just out of curiosity I would like to know how many processor cores the .NET task scheduler supports.

Windows Server 2012 supports up to 640 cores. Was (is) .NET limited to 64 or would it use all available cores?

like image 468
Peter Meinl Avatar asked Sep 16 '12 07:09

Peter Meinl


1 Answers

.NET does support all cores. Answer from Stehphen Toub in the MSDN Parallel Extensions Forum:

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.)

like image 151
Peter Meinl Avatar answered Sep 29 '22 05:09

Peter Meinl