Build/Test Issues

Constantly running out of disk space on my 6GB RamDrive with a 200mb solution

Started by ivanz on 13,850 views

My solution is 200MB clean and 250MB when build. I am using a 6GB RamDrive for NCrunch and it's constantly getting full and out of space. It happens so often that NCrunch is starting to get in my way (I have to disable it, format the drive and re-enable it).

I don't have anything special about my solution - NuGet with package restore enable and the .nuget directory added to the NCrunch "Include additional files" on solution and project level and the other thing is PostSharp.

How can I help fix this?

P.S: This topic should probably be in "Daily Usage Issues"

Edited

I think the first thing to identify would be what is eating up so much space in the NCrunch workspace. NCrunch can and will duplicate your projects inside the workspace, though not normally more than would be required to run things in parallel - so using more than 6GB on a 250MB solution seems quite extreme.

How much space is used by your nuget packages? NCrunch will copy/duplicate these to EVERY workspace, so if you have a large number of projects using many nuget references, this could get very hungry. Also, do you have any large resource files that are shared between projects that you've identified by using the 'Additional files to include' setting?
Remco wrote:I think the first thing to identify would be what is eating up so much space in the NCrunch workspace. NCrunch can and will duplicate your projects inside the workspace, though not normally more than would be required to run things in parallel - so using more than 6GB on a 250MB solution seems quite extreme.

How much space is used by your nuget packages? NCrunch will copy/duplicate these to EVERY workspace, so if you have a large number of projects using many nuget references, this could get very hungry. Also, do you have any large resource files that are shared between projects that you've identified by using the 'Additional files to include' setting?


I will play around when I get the chance in the next few days, but just wanted to say that my nuget packages folder is 120MB
That does sound like it would likely be the source of most of the disk consumption. How many projects do you have in your solution?
24 projects
Ok - it's almost certainly the duplication of the nuget resources then. 24 * 120 = 2880MB and then this will be duplicated again for some of the projects you're actively working in.

For the time being, I think it's a safe assumption that the layout of this solution won't fit on a RAM drive. I'll make a note in my backlog to have a think about how NCrunch may be able to handle this better. Thanks for reporting this problem!
Remco wrote:Ok - it's almost certainly the duplication of the nuget resources then. 24 * 120 = 2880MB and then this will be duplicated again for some of the projects you're actively working in.

For the time being, I think it's a safe assumption that the layout of this solution won't fit on a RAM drive. I'll make a note in my backlog to have a think about how NCrunch may be able to handle this better. Thanks for reporting this problem!


I see. Just an idea - you could pick up NuGet presence in the solution and maybe add some smart logic (instead of "additional files") specific for NuGet which copies the packages folder only ever to a single location and then use hard link to it for each project ( Hard Links info and Hard Links in .NET/C#)

Edited

For anyone interested, the recently released v1.39b contains a fix that should greatly reduce the disk consumption of solutions that are using Nuget.
Remco wrote:For anyone interested, the recently released v1.39b contains a fix that should greatly reduce the disk consumption of solutions that are using Nuget.


Unfortunately I am still constantly running out of space if I allocate a 6GB drive for the solution with 1.40.x
Are there any obvious indications around what is taking up all the space? Can you give me a rough count of the number of project workspaces that NCrunch has created on your RAM drive? (these are basically just directories with numbered names nested underneath a directory with the same name as the ID of the devenv.exe process).

Post a reply

Log in to reply.