Search code examples
.netmulticore

.NET Framework support for multicore hardware


I've been tasked to write a high performance, high availability service that will run on a multicore box.

Do I need to make use of Task Parellel Library to really leverage a multicore server or will the service automagically run faster if I throw more hardware (cores) at it? Does the .NET framework provide the magic for me under the covers?

As a corollary, will there be performance gains by upgrading the server with more cores (keeping the spec of each individual core the same) for .NET applications that do not use TPL?

As per my understanding (perusing Joe Duffy's book and his blogs), you really do need to program for multicore. Is my conclusion accurate?


Solution

  • This is difficult to answer accurately since parallel processing is not a generic problem. You'll need to analyze your project to find places where you can leverage parallel processing.

    If your application can be easily broken down into concrete independent tasks, parallel processing will definitely improve. If its primarily serial in nature, multiple cores/threads won't really help at all.

    If you've determined that parallel tasks represent the core of your process, a parallel library can help you perform the basic tasks as well as make it easier to get right.