Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache folder grows boundlessly #1772

Open
GabeDeBacker opened this issue Mar 31, 2022 · 3 comments
Open

Cache folder grows boundlessly #1772

GabeDeBacker opened this issue Mar 31, 2022 · 3 comments

Comments

@GabeDeBacker
Copy link

Several users have reported that they are losing disk space due to the GVFS cache folder growing boundlessly.

In their scenarios, they create and delete clones of the Windows OS repository commonly. The issue is that the GVFS cache state of the deleted repositories remain forever causing disk space to be lost.

Suggestion would be to perform some type of garbage collection on the GVFS cache folder during boot, mount, etc.

@GabeDeBacker
Copy link
Author

More information can be found here:
Bug 38724591: GVFS should have a mechanism to clean cache folder rather than grow boundlessly

@derrickstolee
Copy link
Contributor

It is intentional that the cache folder does not remove any Git objects because they might be needed by the user. The objects are compacted by background maintenance at a regular interval, but that can only do so much as the repository grows in size.

One way to reduce the size of the repository is to delete the cache directory and run git fetch from your enlistment, which will download the necessary commits and trees again, starting from the smallest set of objects necessary for efficient Git commands. You would need to redownload any blob objects as necessary while working in the repository, so you would notice the repository being a bit slower until these objects catch up.

@GabeDeBacker
Copy link
Author

The issue here is that users of GVFS have no real idea how the cache operates, so a mechanism where GVFS can do this something like this automatically (or at least inform the user somehow) is what the request is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants