GVFS: Git at Enterprise Scale
Make massive repositories feel lightweight and fast
Created by Microsoft to support the development of Microsoft Windows, the largest Git repository on earth. | Microsoft
What is GVFS?
Git Virtual File System (GVFS) is an open source system that enables Git to operate at enterprise-scale. It makes using and managing massive Git repositories possible.
How does it work?
GVFS virtualizes the filesystem beneath your Git repository so that Git tools see what appears to be a normal repository when, in fact, the files are not actually present on disk. GVFS only downloads files as they are needed.
GVFS also manages Git's internal state so that it only considers the files you have accessed, instead of having to examine every file in the repository. This ensures that operations like status and checkout are as fast as possible.
Git struggles to handle enterprise-scale repositories. Operations like cloning will slow to a crawl when you have millions of files in a repository, and even something as simple as getting your repository status will leave you waiting.
GVFS was created by the Visual Studio Team Services team at Microsoft, specifically to deal with these scale issues for Microsoft's own codebases.
With GVFS, developers using Git and Visual Studio Team Services can stay productive, even in mammoth repositories like the Windows operating system, which clocks in at roughly 300 GB (3.5 million files). It's the largest Git repository in the world.
GVFS is freely available and Open Source. If your team and your codebase are growing to enterprise-scale, GVFS may be a great fit.
Example: GVFS and the Windows repository
Here's a comparison of some common Git actions on the Windows repository with Visual Studio Team Services.
|Action||Without GVFS||With GVFS|
|Clone (Bare)||12+ hours||4-5 minutes|
|Checkout||3 hours||30 seconds|
|Status||10 minutes||3 seconds|
|Commit||30 minutes||6 seconds|
Git at Scale
The recent migration of the Windows codebase to a single Git repo presented us with some very interesting scale challenges. In this series of articles, we'll discuss each of these challenges in depth, and how we solved them.
Technical Scale Challenges
It's become "common knowledge" that Git struggles with larger repos, but what does that mean, exactly? In this article, we'll break dows the challenges Git faces when scaling to large repos.
GVFS Design History
In this article, we'll cover how we arrived at the need for GVFS and the alternatives that we looked at along the way.
GVFS in the news
- GitHub adopts Microsoft's tool for supporting massive software projects
- Microsoft releases Git Virtual File System performance results
- Microsoft now uses Git and GVFS to develop Windows
- Microsoft hosts the Windows source in a monstrous 300GB Git repository
- Microsoft brings scalable Git to Visual Studio in improved GVFS