Documentation

Documentation
V5 Documentation

CPU Cores Assigned to NCrunch / CPU Cores Assigned to IDE

Global-level NCrunch configuration settings Default Value: 50% of cores assigned to NCrunch, 50% of cores assigned to your IDE (also controlled by the configuration wizard)
ID/Tag in config file: CPUCoresAssignedToNCrunch, CPUCoresAssignedToIDE

Purpose

These two settings control the allocation of CPU resources between NCrunch and your IDE.

To prevent the IDE from being obstructed, NCrunch will lock all of its activity to only be processed by specific CPU cores. This functionality is critical in ensuring that the computer is able to operate efficiently in a state where it is likely to be overloaded with background processing.

Usage

These configuration settings are formatted as comma-delimited lists of CPU core indexes. A computer with 4 logical CPU cores will support the assignment of cores from 0 to 3.

CPU core assignments are handled by logical cores, not physical cores. This means that a hyper-threaded CPU with 4 physical processor cores will be considered as an 8-core system by NCrunch. You should consider this carefully when choosing the split of cores between NCrunch and your IDE, as it is not efficient to have the same physical core being used by both NCrunch and your IDE.

A hyper-threaded CPU with 4 physical cores will typically have its logical cores identified between the physical cores, for example:

Physical Core Core 1 Core 2 Core 3 Core 4
Logical Identifiers 0, 1 2, 3 4, 5 6, 7

Recommendations

These settings are much easier to configure using the configuration wizard. When configuring them manually, avoid the following situations:

  • A logical CPU core assigned to both VS and NCrunch - This will break the division between VS and NCrunch and could cause NCrunch's background processing to 'steal' important resources from VS intermittently, while also causing less efficient use of the CPU core.
  • A physical CPU core assigned to both VS and NCrunch - For the same reasons as above, this is a bad idea. It is very easy to do this accidently, for example, by assigning all 'odd' cores to VS, and all 'even' cores to NCrunch.
  • Too few CPU cores assigned to VS - The processing performed by VS is a much higher priority than that performed by NCrunch. If VS lacks sufficient CPU resources, you will experience jerky and/or unresponsive behaviour inside the IDE.

Visual Studio 2010 typically requires at least one physical CPU core in order to operate without interference. When using IDE plugins that perform background tasks (i.e. refactoring tools with solution-wide analysis), it's recommended that you provide Visual Studio with two physical cores if possible.

Visual Studio 2012 and 2013 should always be assigned at least two physical cores where possible.

Visual Studio 2015 should have at least three physical cores where possible.

Visual Studio 2017, 2019 and 2022 seem to require at least four physical cores for optimal performance, but may function with less depending on the size of the solution and how VS has been configured.

Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download