I was doing some cleanup on my machine today, and noticed that my vault cache folder is about 3.3Gb, which is almost certainly larger than the total set of controlled files on my machine.
I have the options set to store everything in the cache folder.
In Perforce, there is an option to remove a folder from the client, but Vault has no such option. If I do a get of a project, do some work on it and move on to something else, I will delete the working files from my machine. In that case, how does Vault know that its copy of those files in the cache folder are now obsolete and can be removed?
Is there a way to manage the cache files so that they don't continually grow? The only options I can think of are to get to a state where nothing is checked out and then blow away the existing cache, or change to store files in the working folder instead. Neither is an entirely satisfactory solution.
Is there some bit of magic going on behind the scenes that I am unaware of, or should I just not look at the size of my cache folder? At this rate I may need to move it to a different partition.
Version info:
Client Information
Vault Client Version: 3.1.6.3658
.Net Framework Version: 1.1.4322.573
Operating System: Microsoft Windows XP Professional
Service Pack: 2.0
OS Version: 5.1.2600
Total Physical Memory: 1.49 GB
Time Zone: (GMT-06:00) Central Time (US & Canada)
Server Information
Vault Server Version: 3.1.6.3658
.Net Framework Version: 1.1.4322.2032
Operating System: Microsoft(R) Windows(R) Server 2003, Standard Edition
Service Pack: 0.0
OS Version: 5.2.3790
Timezone: (GMT-06:00) Central Time (US & Canada)
SQL Version: Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: )
Question (and concern) about cache files
Moderator: SourceGear
The size of the cache is a combination of the cached client info (the tree, checkouts, pending change set, etc) and the State/Baseline folder, _sgvault. The "CacheMember*" cache files are created for each Vault server you've logged into and for each account you've logged in under. This can be deleted periodically, but requires resetting working folders.Is there a way to manage the cache files so that they don't continually grow?
What is probably using the most space are the _sgvault directories, which hold the baselines of all the files you've retrieved to your desktop with Vault. These can be deleted when you no longer need them, but it may be difficult to pick and choose which to delete if you are storing them in the Client Cache Folders. You can delete the entire _sgvault directory and then you'll download new baselines for just the files you're currently working with.
Another option is to store the _sgvault directories in the working folder. When you no longer need the working folder for a particular node in the Vault tree, you can delete it and the _sgvault directory at the same time.
This setting is in Vault Client under Tools->Options->Local Files->Cache/Backup locations.
We do have a feature request logged for an easy way to delete selected cache files from the GUI Client. I'll add your "vote."
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
Re: Question (and concern) about cache files
+1 on the vote count here. Many developers here have complained that their Vault cache is well over 100GB, which is more than 3 times the size of the corresponding source directory. And when you're working with solid-state drives (where space is far more precious), 100GB can be a very large percentage of the drive. I myself have run out of space on my 200GB SSD several times now, all because the Vault cache was growing out of control.
Is there any way to further limit the size of the cache folder? Right now I've updated my Vault client options to limit the number of baseline files to 1 (Options --> Local Files --> Backup Location). What, exactly, will this do to help the problem? Please explain in detail what we should expect about the size of the cache vs. the size of the source folder when using this option.
Another suggestion would be to allow for selective pruning of the vault cache, presumably through an interface that the Vault client would provide. As is, about the best one can do is to delete all files in the Vault cache (as there is no human-readable mapping between the cache folders and the source folders).
Is there any way to further limit the size of the cache folder? Right now I've updated my Vault client options to limit the number of baseline files to 1 (Options --> Local Files --> Backup Location). What, exactly, will this do to help the problem? Please explain in detail what we should expect about the size of the cache vs. the size of the source folder when using this option.
Another suggestion would be to allow for selective pruning of the vault cache, presumably through an interface that the Vault client would provide. As is, about the best one can do is to delete all files in the Vault cache (as there is no human-readable mapping between the cache folders and the source folders).
Re: Question (and concern) about cache files
When you set a working folder and do a Get Latest, the Vault client retrieves repository files to the working folder and copies of those files go into the cache as a baseline file. These baselines are used to determine file status. Everytime a file is updated locally and checked in, the new version goes into the cache. Old versions are not automatically deleted. So if you have a lot of files in the working folders and you're making a lot of changes, the baselines, which are stored in an _sgvault folder, can grow larger than what's in the working folders.
One way to keep this manageable is to change the setting on how many baselines of each file should be kept in the cache. You've set yours to 1, which is appropriate -- but that doesn't automatically delete the files that were already in the cache. You'd need to clear the client-side cache first.
Close any open clients first.
http://support.sourcegear.com/viewtopic ... 13&t=11513
Another option is to store the _sgvault directories in the working folder. When you no longer need the working folder for a particular node in the Vault tree, you can delete it and the _sgvault directory at the same time.
Settings to manage the cache are in the Vault Client under Tools->Options->Local Files->Cache location.
One way to keep this manageable is to change the setting on how many baselines of each file should be kept in the cache. You've set yours to 1, which is appropriate -- but that doesn't automatically delete the files that were already in the cache. You'd need to clear the client-side cache first.
Close any open clients first.
http://support.sourcegear.com/viewtopic ... 13&t=11513
Another option is to store the _sgvault directories in the working folder. When you no longer need the working folder for a particular node in the Vault tree, you can delete it and the _sgvault directory at the same time.
Settings to manage the cache are in the Vault Client under Tools->Options->Local Files->Cache location.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
Re: Question (and concern) about cache files
Just to be clear, after clearing the cache and setting the baseline count to 1, should we expect the cache folder and the source folder to pretty much remain in sync (size wise)?
Re: Question (and concern) about cache files
To some extent. When you first do a Get into a working folder, Vault creates a baseline for each of those files. Every time you edit a file in the working folder, another baseline version is added. You'll have as many baselines as you have versions unless you clear the _sgvault folder or set a limit in Vault Client Options.
Vault also adds a State file to each folder in the _sgvault folder.
It appears there's a bug in the baseline settings. It's logged as work item 15951 and it's slated to be fixed for Vault 6.0. Whatever setting you have in the client, the Vault cache actually keeps two more baselines than what you've selected.
So for now, to minimize baselines, choose to keep 0 baselines. Vault will still create two baselines files for each file in the working folder. But then it shouldn't grow past that.
Vault also adds a State file to each folder in the _sgvault folder.
It appears there's a bug in the baseline settings. It's logged as work item 15951 and it's slated to be fixed for Vault 6.0. Whatever setting you have in the client, the Vault cache actually keeps two more baselines than what you've selected.
So for now, to minimize baselines, choose to keep 0 baselines. Vault will still create two baselines files for each file in the working folder. But then it shouldn't grow past that.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager