Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

Maximum Number of Processor Cores in CLR (VS 2013, Server 2012)

$
0
0

I found another thread on this subject from 2010, but it gave the appearance of having been resolved in 2010. So, it is unclear to me why I would still be seeing my CLR programs limited to using 32 logical processors on a Windows Server 2012 with 48 logical processors.

Forums/vstudio/en-US: "Maximum Number of Processor Cores in CLR"

I wrote the following dumb C# program to test whether my program written in C# actually had access to all 48 logical processors, since it appeared to be more restricted in processor use than when I was running the same processing using multiple processes.

    class Program
    {
        static void Main(string[] args)
        {
            var threads = new Thread[100].Select(t => new Thread(() =>
            {   for (;;) Math.Max(int.MaxValue, int.MinValue); })).ToArray();
            Array.ForEach(threads, t => t.Start());
        }

    }

Which produces the following Task Manager plots on our Windows Server 2012 with 2 x Intel Xeon processors with 24 cores and 48 logical processors.

<unfortunately, not allowed to include images>

It is pretty easy to see from the screenshot (not included) that only 32 out of 48 processors are in use by the program (at 100% utilization), resulting in around 75% processor utilization. The effect is the same with any number of threads greater than or equal to 32.

Is there any way that I can fix this program or the system on which it is running to make user of all 48 logical processors within a single process?


Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>