Daily Usage Issues

Console tool, limit memory usage of NCrunch.exe?

Started by GreenMoose on 2,838 views

Is there a way to limit the memory usage of NCrunch.exe ? I guess NCrunch.exe itself is not anything that can be tweaked via configuration settings?

Bakground
A build agent with 8GB RAM seems to be insufficient since building NCrunch on that agent, with weird delays in loading times like below, and also fails db tests with timeouts of 1 minute (not failing on 10GB machine).

10GB agent:

[11:44:54] :	 [Step 5/7] [InitialisationQueueTask-17] Loading project: X:\Infrastructure\XXX.Infrastructure.csproj
[11:44:54] :	 [Step 5/7] [InitialisationQueueTask-16] Loading project: X:\Domain\XXX.Domain.ModelFactories\XXX.Domain.ModelFactories.csproj
[11:44:54] :	 [Step 5/7] [InitialisationQueueTask-19] Loading project: X:\Presentation\XXX.Web\XXX.Web.csproj
[11:45:15] :	 [Step 5/7] [InitialisationQueueTask-11] Loading project: X:\Tests\NUnitTests\NUnitTests.csproj

8GB agent:

[12:24:38] :	 [Step 5/7] [InitialisationQueueTask-18] Loading project: X:\Presentation\XXX.Web\XXX.Web.csproj
[12:24:38] :	 [Step 5/7] [InitialisationQueueTask-16] Loading project: X:\Infrastructure\XXX.Infrastructure.csproj
[12:24:38] :	 [Step 5/7] [InitialisationQueueTask-15] Loading project: X:\Domain\XXX.Domain.ModelFactories\XXX.Domain.ModelFactories.csproj
[12:26:16] :	 [Step 5/7] [InitialisationQueueTask-12] Loading project: X:\Tests\NUnitTests\NUnitTests.csproj


(10GB on another agent seems to work better)
[img=https://i.imgur.com/5LPJR8D.png]MemoryUsage[/img]

Thanks.

Edited

Is this being used in the context of a large solution with high code coverage density?

Such a scenario can make NCrunch especially hungry. The bulk of the engine's memory consumption comes from its code coverage indexing. We need to individually track and efficiently index every line covered by every test, in such a way that allows code coverage to be rapidly merged, updated and reported. We haven't found any way to do this yet without a reasonably high amount of memory consumption. It may well be that using NCrunch on a solution of this scale is simply going to require more memory than the machine has available. Sadly there are no quick wins for us to reduce memory consumption in this area :(

Post a reply

Log in to reply.