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?
.NET does support all cores. Answer from Stehphen Toub in the MSDN Parallel Extensions Forum:
The default TPL
TaskScheduler
targets the .NETThreadPool
. 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.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With