Is it possible to turn off the working folders scan ?

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
MikiWatts
Posts: 19
Joined: Sun May 31, 2009 10:47 am

Is it possible to turn off the working folders scan ?

Post by MikiWatts » Tue Dec 20, 2016 7:48 am

We have an application that we've been working on for the last 10 years or so, and it has grown to about 8000 files. We maintain in the same repository several major versions and create branches for each feature which are then merged to the required versions.
This causes each developer to have several folders mapped as working folders for each version and branch that he worked with.
Vault (and Visual Studio) does a periodic scan for changes in all the mapped working folders. The problem is that with 8000 files in each working folder, the scan causes the CPU to skyrocket and place a lot of work on the disk (including accessing vault cache files). This causes VS and Vault to become very slow and unresponsive until the scan is complete, which can be up to several minutes at times. Our developer machines use SSD so it'd be even worse if we had regular hard drives.

deleting the vault cache along with the CacheMember* files helps because it removes all the working folders mappings, but it doesn't hold for long once the developer starts working again.

We've tried turning off the "Automatically refresh every X minutes" in Vault options, but it didn't had an effect.

Is there a way to turn off this periodic scan, or change its period ? or is this something else ?

We're using Vault 9.1

MikiWatts
Posts: 19
Joined: Sun May 31, 2009 10:47 am

Re: Is it possible to turn off the working folders scan ?

Post by MikiWatts » Tue Dec 20, 2016 8:39 am

What I've noticed is that this starts immediatly after building the solution in VS, even though there were no changes. I've enabled the vault client log with all log categories, and the only thing there is in the log is:

Code: Select all

20/12/2016 16:31:11 <wf>: [Watcher:6] wf for h:\projects\PrioriPOS 2.0.2.19\SaleTester\Properties created
20/12/2016 16:31:11 <mutex>: [Watcher:6] Created mutex 2080 (Vault_WF_-1563294569)
20/12/2016 16:31:11 <mutex>: [Watcher:6] Took mutex 2080
20/12/2016 16:31:11 <wf>: [Watcher:6] wf h:\projects\PrioriPOS 2.0.2.19\SaleTester\Resources mutex locked
20/12/2016 16:31:11 <mutex>: [Watcher:6] Released mutex 2080
20/12/2016 16:31:11 <wf>: [Watcher:6] wf h:\projects\PrioriPOS 2.0.2.19\SaleTester\Resources mutex released
20/12/2016 16:31:11 <wf>: [Watcher:6] wf for h:\projects\PrioriPOS 2.0.2.19\SaleTester\Resources created
20/12/2016 16:31:11 <mutex>: [Watcher:6] Created mutex 2336 (Vault_WF_-2135847654)
20/12/2016 16:31:11 <mutex>: [Watcher:6] Took mutex 2336
20/12/2016 16:31:11 <wf>: [Watcher:6] wf h:\projects\PrioriPOS 1.16.9.9 mutex locked
20/12/2016 16:31:11 <mutex>: [Watcher:6] Released mutex 2336
20/12/2016 16:31:11 <wf>: [Watcher:6] wf h:\projects\PrioriPOS 1.16.9.9 mutex released
20/12/2016 16:31:11 <wf>: [Watcher:6] wf for h:\projects\PrioriPOS 1.16.9.9 created
20/12/2016 16:31:11 <mutex>: [Watcher:6] Created mutex 2144 (Vault_WF_823273879)
20/12/2016 16:31:11 <mutex>: [Watcher:6] Took mutex 2144
20/12/2016 16:31:11 <wf>: [Watcher:6] wf h:\projects\PrioriPOS 1.16.9.9\SqlSmoBackup mutex locked
20/12/2016 16:31:11 <mutex>: [Watcher:6] Released mutex 2144
20/12/2016 16:31:11 <wf>: [Watcher:6] wf h:\projects\PrioriPOS 1.16.9.9\SqlSmoBackup mutex released
20/12/2016 16:31:11 <wf>: [Watcher:6] wf for h:\projects\PrioriPOS 1.16.9.9\SqlSmoBackup created
20/12/2016 16:31:11 <mutex>: [Watcher:6] Created mutex 2372 (Vault_WF_-1056222774)
20/12/2016 16:31:11 <mutex>: [Watcher:6] Took mutex 2372
20/12/2016 16:31:11 <wf>: [Watcher:6] wf h:\projects\PrioriPOS 1.16.9.9\SqlSmoBackup\Properties mutex locked
which repeats itself for all the folders in the mapped working folders. And the folders shown in the log above were not touched at all.

MikiWatts
Posts: 19
Joined: Sun May 31, 2009 10:47 am

Re: Is it possible to turn off the working folders scan ?

Post by MikiWatts » Tue Dec 20, 2016 8:41 am

Also, every once in a while while this is running, there's this error:

Code: Select all

20/12/2016 16:32:03 <wf>: [Watcher:6] wf h:\projects\PrioriPOS 2.0.7.0\PrioriPOSAPI.Common mutex released
20/12/2016 16:32:03 <wf>: [Watcher:6] wf for h:\projects\PrioriPOS 2.0.7.0\PrioriPOSAPI.Common created
20/12/2016 16:32:03 <mutex>: [Watcher:6] Created mutex 2204 (Vault_WF_1881883894)
20/12/2016 16:32:03 <mutex>: [Watcher:6] Took mutex 2204
20/12/2016 16:32:03 <wf>: [Watcher:6] wf h:\projects\PrioriPOS 2.0.7.0\PrioriPOSAPI.Common\Transactions mutex locked
20/12/2016 16:32:07 <mutex>: [Watcher:6] Released mutex 2204
20/12/2016 16:32:07 <wf>: [Watcher:6] wf h:\projects\PrioriPOS 2.0.7.0\PrioriPOSAPI.Common\Transactions mutex released
20/12/2016 16:32:07 <wf>: [Watcher:6] wf for h:\projects\PrioriPOS 2.0.7.0\PrioriPOSAPI.Common\Transactions created
20/12/2016 16:32:07 <generic>: [<No Name>:13] FileSystemWatcher error, probably overflow of its internal buffer: System.IO.ErrorEventArgs  Too many changes at once in directory:h:\projects\PrioriPOS 2.0.7.0 miki.  
   at VaultClientOperationsLib.ClientInstance.WatchedFolderErrorHandler(Object sender, ErrorEventArgs e)
   at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

20/12/2016 16:32:07 <mutex>: [Watcher:6] Created mutex 2240 (Vault_WF_-864625312)
20/12/2016 16:32:07 <mutex>: [Watcher:6] Took mutex 2240
20/12/2016 16:32:07 <wf>: [Watcher:6] wf h:\projects\PrioriPOS 2.0.7.0\PrioriPOSAPI.Common\Currencies mutex locked
20/12/2016 16:32:07 <mutex>: [Watcher:6] Released mutex 2240
20/12/2016 16:32:07 <wf>: [Watcher:6] wf h:\projects\PrioriPOS 2.0.7.0\PrioriPOSAPI.Common\Currencies mutex released
20/12/2016 16:32:07 <wf>: [Watcher:6] wf for h:\projects\PrioriPOS 2.0.7.0\PrioriPOSAPI.Common\Currencies created

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Is it possible to turn off the working folders scan ?

Post by Beth » Tue Dec 20, 2016 8:59 am

How were the projects added to Vault? Did you use Visual Studio to add them or the GUI client?

Did you set any working folders in Vault, or did you let Visual Studio set them?

When you are building, how many projects are being built?

Does each individual user perform builds, or is there a separate machine for that?

In the Vault Tools - Options - Concurrent Development Style, how are those options set?

If you're using CVS style, the additional scanning is part of its normal function. Using VSS mode significantly cuts back on the scanning.
Beth Kieler
SourceGear Technical Support

MikiWatts
Posts: 19
Joined: Sun May 31, 2009 10:47 am

Re: Is it possible to turn off the working folders scan ?

Post by MikiWatts » Tue Dec 20, 2016 10:11 am

Beth wrote: >> How were the projects added to Vault? Did you use Visual Studio to add them or the GUI client?

New projects are added from Visual Studio

>> Did you set any working folders in Vault, or did you let Visual Studio set them?

We're setting the working folder for the version/branch from Vault and checking the "Force all subfolders to use inherited working folder"

>> When you are building, how many projects are being built?

about 30 or so

>> Does each individual user perform builds, or is there a separate machine for that?

Both, but the problem is with the individual developer (possibly the same thing happens on the Continous Integration machine, but there's no user connected to see it)

In the Vault Tools - Options - Concurrent Development Style, how are those options set?

>> We're using CVS style, and all the options are unchecked, and Make Writable is set to "Make all files writable"

If you're using CVS style, the additional scanning is part of its normal function. Using VSS mode significantly cuts back on the scanning.
>> Since we're using separate branches for each feature, and only merge on the main versions, changing to VSS style might indeed solve this. I'll check tomorrow morning and see how it works.

MikiWatts
Posts: 19
Joined: Sun May 31, 2009 10:47 am

Re: Is it possible to turn off the working folders scan ?

Post by MikiWatts » Wed Dec 21, 2016 7:07 am

I've set the Concurrent Development Style options to check "Require Check out Before Check In" and "Make all files writable" and left the other two options unchecked. That stopped the scan and has improved the operations that caused the scan.
So unless something new comes up, I think that solved the issue. Thanks for the help!

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Is it possible to turn off the working folders scan ?

Post by Beth » Wed Dec 21, 2016 8:50 am

Thank you for the update.
Beth Kieler
SourceGear Technical Support

MikiWatts
Posts: 19
Joined: Sun May 31, 2009 10:47 am

Re: Is it possible to turn off the working folders scan ?

Post by MikiWatts » Wed Dec 21, 2016 10:25 am

Well, I spoke too soon. I've had a period when there was no scanning today, but it came back, and even when I select the full VSS mode, I still get the scanning behaviour.

What else can be done ?

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Is it possible to turn off the working folders scan ?

Post by Beth » Wed Dec 21, 2016 2:17 pm

When you went to the full VSS mode, did you allow the files to be set to read only? That's what it takes to be fully in VSS mode. After the change, you can either perform a Get Latest to change the writable setting on the files, or you can manually set them all to read-only.
Beth Kieler
SourceGear Technical Support

MikiWatts
Posts: 19
Joined: Sun May 31, 2009 10:47 am

Re: Is it possible to turn off the working folders scan ?

Post by MikiWatts » Sun Dec 25, 2016 2:51 am

Beth wrote:When you went to the full VSS mode, did you allow the files to be set to read only? That's what it takes to be fully in VSS mode. After the change, you can either perform a Get Latest to change the writable setting on the files, or you can manually set them all to read-only.
I see. That's a bit of an issue for us, since we have post build events in the projects that copy resource files. If I added an attrib command to remove the readonly on the files that are copied, how would Vault treat those files ?

MikiWatts
Posts: 19
Joined: Sun May 31, 2009 10:47 am

Re: Is it possible to turn off the working folders scan ?

Post by MikiWatts » Sun Dec 25, 2016 6:26 am

So it seems that the Bin folder was checked in on one of the projects, and that was the cause of the errors that I saw. After removing the Bin folder, deleting the solution folder and get latest with the options "Require Check Out before Check In" and "Make all files read-only", the scanning of other folders is gone or at the most just touches a few dll files.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Is it possible to turn off the working folders scan ?

Post by Beth » Tue Dec 27, 2016 8:02 am

Thank you for the update.

The only side affect of files being read only is that they can't be edited without a check out. Another option you have is to have a check out as part of the build.
Beth Kieler
SourceGear Technical Support

MikiWatts
Posts: 19
Joined: Sun May 31, 2009 10:47 am

Re: Is it possible to turn off the working folders scan ?

Post by MikiWatts » Tue Dec 27, 2016 8:41 am

Beth wrote:Thank you for the update.

The only side affect of files being read only is that they can't be edited without a check out. Another option you have is to have a check out as part of the build.
I've ran into much less problems than I'd thought I'd would with the read only flag. On the local machines it builds without issues, and on the Continuous Integration machine I can set the flag specifically that it won't set it to read only, so it doesn't run into problem there either.

Post Reply