Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Limit Disk Space Usage When Using RAM Disk for Workspace Path
KabanaSoft
#1 Posted : Tuesday, February 24, 2015 9:32:49 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/6/2013(UTC)
Posts: 7
Location: United States of America

Hello,

I have setup a RAM disk with 2GB of space allocated, and have set my workspace base path to a path on the RAM disk per the instructions here:

http://www.ncrunch.net/d...ion_workspace-base-path

For reference, we have alot of projects and unit tests in our solution (27 projects, 1000+ unit tests).

The problem that i am having is that after i run several unit tests, i get an error from NCrunch saying the a project is failing to build even though it builds fine in Visual Studio and i can't run any of my tests.

After further inspection, i see that NCrunch has consumed all 2GB of space on the RAM disk, and the reason NCrunch can't build the project is because its getting a file IO error due to lack of space on the RAM disk. To fix, i have to restart Visual Studio which is becoming a PITA after doing it so many times.

Is it possible to limit the amount of disk space that NCrunch uses for the Workspace folder so that i don't have to keep increasing the size of my RAM Disk?

I would have thought that 2GB should be more than enough but apparently it is not.

Please let me know if there is a setting or a way to limit or cleanup old test files to fix this problem.

Thanks!
Mark
Remco
#2 Posted : Tuesday, February 24, 2015 9:42:42 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi Mark,

Thanks for posting!

NCrunch does, unfortunately, need to create the workspaces in order to correctly operate. Restarting VS or the engine won't solve this problem for you, as every time you do this it'll just be a matter of time before the concurrency and build needs of the engine will once again overstep the size of your RAM disk.

It's worth being aware that there is a limit to the number of workspaces NCrunch will create - it doesn't just keep going up and up, although disk consumption may vary greatly depending on your solution.

The only way to influence the number of workspaces is indirectly through configuration settings, particularly the 'Max number of processing threads' and 'Process pool size' settings. Setting these options to lower values will reduce the number of workspaces NCrunch requires at any one time, although this may also slow the engine.

Unfortunately there is no feasible way for NCrunch to self-limit the number of workspaces it creates. The problem behind this could in many ways be compared to a process trying to limit its overall memory consumption. NCrunch would not be able to avoid creating new workspaces without greatly inhibiting its own operations at a level that would make use of the product very limited/painful. If you're having problems with disk space running out on the server, there are several options for resolving this:

1. Adjust the 'Max number of processing threads' and 'Process pool size' to lower values so that NCrunch needs less workspaces

2. Look at ways of reducing the disk consumption of each workspace. Check for large files that are being included in the project file or 'Additional files to include' setting that aren't actually needed by NCrunch. Files that are included using 'Additional files to include' at solution level are shared between ALL projects in the solution and can greatly increase disk consumption, so make sure you have nothing included here unless it's absolutely needed.

3. Increase available disk space for the workspace, perhaps consider moving to a physical drive instead of a RAM disk (I know this is probably what you are trying to avoid, but sometimes it's just the easiest option)
KabanaSoft
#3 Posted : Tuesday, February 24, 2015 10:15:00 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/6/2013(UTC)
Posts: 7
Location: United States of America

Hi Remco,

Thanks for the response, i figured that this was as such and there wasn't a way to limit the disk usage.

I have lowered my 'Max number of processing threads' from 8 to 4.

However, i cannot find the 'Process pool size' setting anywhere under the config. Did you mean the 'Test process memory limit' or is it called something else or perhaps i missed it?

Let me know, thanks!
Remco
#4 Posted : Tuesday, February 24, 2015 10:20:41 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
KabanaSoft;7018 wrote:
Hi Remco,
However, i cannot find the 'Process pool size' setting anywhere under the config. Did you mean the 'Test process memory limit' or is it called something else or perhaps i missed it?


Sorry, I was remembering this setting under its old name.. The correct name is 'Max test runners to pool' - http://www.ncrunch.net/documentation/reference_global-configuration_max-test-runners-to-pool.
KabanaSoft
#5 Posted : Tuesday, February 24, 2015 10:36:49 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/6/2013(UTC)
Posts: 7
Location: United States of America

Ok, i think i found it. I see it listed as 'Max number of test runner processes to pool'

I already had this set to 1, so ill see if reducing the other setting to 4 helps, if not, ill move to a regular disk.

Does the 'Terminate test runner tasks when all test execution is complete' have any effect on Disk space?

Just wondering because all my tests have completed running automatically, but i still see over 1GB being used on that disk and i just restarted VS again not too long ago. Its like NCrunch doesn't delete any workspace files after the tests are done. Let me know.

Remco
#6 Posted : Tuesday, February 24, 2015 11:07:04 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
KabanaSoft;7020 wrote:

Does the 'Terminate test runner tasks when all test execution is complete' have any effect on Disk space?


Yes - it does. I'd recommend turning this setting on.

KabanaSoft;7020 wrote:

Just wondering because all my tests have completed running automatically, but i still see over 1GB being used on that disk and i just restarted VS again not too long ago. Its like NCrunch doesn't delete any workspace files after the tests are done. Let me know.


NCrunch won't remove any workspaces until the engine is shut down or the project related to the workspace is removed/reloaded. Workspaces are fairly expensive to create, so NCrunch will instead prefer to re-use existing workspaces by resynchronising them with your source code changes as necessary.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.044 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download