The video tests how many developers a single self-hosted Git server can support by comparing bare Git, Forgejo, and GitLab across repositories of varying sizes, revealing that bare Git handles the most developers but lacks features, Forgejo offers a balance of capacity and collaboration tools, and GitLab supports fewer developers due to its complex infrastructure. Performance varies significantly with repository size and workload, highlighting the importance of choosing a Git hosting solution based on specific team needs and infrastructure capabilities.
The video explores how many developers a single self-hosted Git server can support by testing three different Git server setups: bare Git, Forgejo, and GitLab. The motivation behind this experiment stems from recent reliability issues with Git and the emergence of alternative source control systems. The creator aims to understand the server requirements for hosting Git independently, which is particularly relevant for small teams or companies wanting to avoid reliance on hosted platforms. The experiment involves simulating developer activities such as fetching, pushing, browsing repository pages, and triggering CI checkouts on identical virtual machines running each Git server.
Three repositories of varying sizes were used to test performance: Flask (small, 11 MB), Django (medium, 276 MB), and Linux (large, 6.2 GB). Each test involved 10 teams with private copies of the repositories, and simulated developers performed typical Git operations at realistic intervals. The performance was measured based on latency and error rates, with strict thresholds for fetch, push, and CI clone operations. The servers were tested on an 8-core, 16 GB RAM machine, and the results showed significant differences in capacity depending on the server and repository size.
Bare Git, being the simplest setup without a web interface or additional features, supported the highest number of developers—up to 16,000 for the small Flask repository and 1,400 for the large Linux repository. Forgejo, which adds a web interface and collaboration features, supported fewer developers but still thousands for smaller repositories. GitLab, with its much larger and more complex stack, supported far fewer developers, especially as repository size increased. GitLab’s performance was limited by background tasks like repository maintenance and memory usage, which caused latency and failures under heavier loads.
The experiment also revealed that the merge bot, which automatically merges branches at a fixed rate, significantly impacted server load. Adjusting the merge bot to scale merges with the number of developers improved Forgejo’s performance but did not help GitLab pass the tests for the Linux repository. Additionally, cloning large repositories was constrained more by network bandwidth than CPU, with all servers handling only a few Linux clones per minute due to the large data transfer involved. Page load times for the web interfaces were also measured, showing Forgejo was consistently faster than GitLab, especially on larger repositories.
In conclusion, the number of developers a self-hosted Git server can handle varies widely based on the server software, repository size, and workload patterns. Bare Git offers the highest capacity but lacks collaboration features, Forgejo strikes a balance with moderate capacity and features, and GitLab provides a rich feature set at the cost of supporting fewer developers. The video encourages viewers to consider their specific needs and infrastructure when choosing a Git hosting solution and invites feedback and discussion from those who self-host Git servers. The full detailed results will be shared via the creator’s newsletter.
Useful Links
- Forgejo Git Hosting Server — Directly relevant as one of the main Git server platforms tested in the experiment.
- GitLab Community Edition — Central to the video as one of the three Git server setups evaluated.
- Linux Kernel Source Repository — Key dataset used to test server performance with large repositories.
- Flask GitHub Repository — One of the repositories used to simulate developer workloads and measure server capacity.
- Django GitHub Repository — Important dataset for evaluating server performance with medium-sized repositories.