ARTICLE - Dev Stack & Tools

Sizing a Self-Hosted Git Server

Do not size a Git service by user count or an anecdotal VPS example. Start with the official requirements for the version, then measure repository growth, concurrent access, Runners, and artifacts, and verify storage and recovery headroom on the target host.

2026-11-29 16IDC Original 8 views
Advertisement

Do not size GitLab or Gitea by user count alone. GitLab's official requirements depend on version, topology, and workload; Gitea's actual resource use also depends on repository size, concurrent clones, database, attachments, and Actions Runners. Separate the official minimum or baseline from your capacity estimate, then validate representative load on the target VPS. Without workload data, a “1 core/512 MB,” “4 GB,” or low-cost host example is not a generally usable specification.

Git Capacity Validation Timeline Check version Official requirements Measure workload Repos and concurrency Test backup Restore in isolation Keep headroom Retest peak load Track app, database, repositories, artifacts, and Runner resources Scope: validation sequence, not a hardware recommendation
Figure 1: Self-Hosted Git Capacity Validation Timeline (Scope: from official requirements to target-instance acceptance)

This sequence keeps vendor baselines, one-off user examples, and production capacity distinct. Record the version, configuration, and test results at each stage so capacity can be reviewed after workload growth or an upgrade.

Check official requirements for the product and deployment version

GitLab's official installation requirements (checked 2026-11-29) give a baseline of 8 vCPU and 16 GB of memory for a single-node installation. A single-node installation in a memory-constrained environment can run with at least 8 GB of memory, but that is not a production-capacity guarantee for an arbitrary workload. The page also lists at least 40 GB for application nodes and repository storage at least equal to the combined repository data; calculate database storage separately from its table. These values come from the current official requirements page and should be rechecked for the target GitLab version, component topology, and workload.

Gitea's official installation material describes prerequisites by installation method, service setup, and database configuration; capacity must be assessed against the actual database, repositories, and enabled features. Do not copy a Gitea Enterprise team-size recommendation as a community-edition requirement, or treat a provider page or user post about a VPS as a universal official minimum. Review the installation index, database preparation, and binary installation guide for the chosen OS, database, and release (checked 2026-11-29).

Capacity area Why it affects resources Inputs to collect
Application and database Web requests, background jobs, indexing, and database connections compete for CPU and memory Version, topology, process/database settings, concurrent access
Git repositories Clone, fetch, and push consume storage, disk I/O, and network Repository use, largest repository, growth, clone/push patterns
LFS, attachments, and artifacts These can grow separately from Git objects and use different storage and backup capacity Enabled features, current size, retention, and growth
CI Runners Build jobs compete for CPU, memory, disk, and network Co-location, parallel jobs, image/dependency cache, isolation
Backups and recovery Backup copies and restore operations need extra space, I/O, and time Retention, off-site copies, recovery objectives, test data size

Plan the Git platform and Runners separately first. If they must share a host, include peak build concurrency as its own stress scenario; do not hide CI CPU peaks inside a user-count estimate.

Measure and validate on the target VPS

On a test instance or during a maintenance window, identify the actual data mount before sampling CPU, memory, disk space, and inodes. The following commands apply to common Linux hosts; replace /path/to/git-data with the actual Git data directory or volume mount. vmstat may require installing a system tools package.

DATA_PATH=/path/to/git-data
printf 'CPU threads: '; nproc
free -h
df -h "$DATA_PATH"
df -i "$DATA_PATH"
vmstat 1 5

Verification: the output should show visible CPU count, available memory, volume capacity and inodes, plus repeated samples of run queue and I/O wait. Near-full storage, sustained memory decline, or increasing peak-period wait means the host has not passed acceptance. For diagnosis, use tools such as iostat where available and observe GitLab/Gitea, the database, and Runners separately rather than relying only on host averages.

Test operations the team actually expects: concurrent clone/fetch/push, a large repository, normal web requests, background jobs, and whether Runners share the host. Record request failures, response times, CPU, memory, disk latency, and network use. Use sanitized data and isolated Runners; do not run unreviewed jobs with production credentials. There is no universal conversion from “users” to CPU: start from the product baseline, increase concurrency gradually, and compare results with project-defined response and recovery objectives.

Acceptance check Action Passing evidence
Resource baseline Compare official requirements with target-host samples Headroom defined by the team remains during peaks, without sustained swap or I/O pressure
Repository and artifact space Measure Git, LFS/attachments, artifacts, and logs, including growth Current use, growth, and retention fit the next expansion or cleanup window
Backup recoverability Back up using the current version's official procedure and restore to an isolated instance Repositories, database, attachments, and configuration are readable; time and omissions are recorded
Upgrade headroom Run the target upgrade path and checks in staging Extra upgrade space is reserved and a failed upgrade has a compatible recovery plan

Use the GitLab and Gitea official deployment material to establish versions and service boundaries; determine host sizing through these measurements and workload tests. A successful backup command is not enough: restore it and check consistency across repositories, database, attachments, and configuration.

Boundaries and limitations

  • GitLab's single-node baseline is not a performance guarantee for a particular workload; distributed deployments require per-component sizing, and memory-constrained installations must be interpreted using official guidance.
  • Gitea database, LFS, attachment, Runner, and repository layouts depend on configuration. This article gives no universal community-edition hardware figure or user limit.
  • Free disk space is not the whole capacity story: backups and upgrades need extra space, while inodes, I/O latency, network bandwidth, and filesystem behavior can become bottlenecks first.
  • Test results apply only to the recorded versions, host, database, data set, and concurrency. Measure again after workload or feature changes.

Frequently asked questions

Can GitLab's official installation requirements be used directly as a VPS purchase specification?

No. The official single-node baseline of 8 vCPU and 16 GB of memory is a starting point, not a workload estimate. Check GitLab version, component topology, repository and database space, and host storage; validate representative data, concurrent clones, and build jobs in staging, then set headroom from monitoring.

Does Gitea Community have one fixed memory requirement for every team?

No universal value applies. Database choice, concurrent clone/push, repositories, LFS, attachments, Actions Runners, and backups change CPU and RAM demand. Deploy the selected Gitea version using official guidance, then increase representative workload on the target VPS and record memory peaks, disk behavior, and response.

How should we measure CPU and memory when a CI Runner shares the Git host?

Use separate samples for the Git application, database, and Runner during representative concurrent builds. Record CPU, memory, and disk wait; Runner jobs can compete with web and repository I/O and expand untrusted-code impact. If co-located, limit concurrency, isolate jobs, and validate peak load on the target VPS.

How do we know a Git service backup can be restored?

Use an isolated instance for restoration. Follow the official procedure for the current version; a backup file alone proves little. Verify repository access with a test clone, database records, attachments or LFS, configuration, and required keys, and record restore time. Correct missing retention scope or steps and repeat the recovery test.

Related Providers

  • GitLab: Check official installation requirements, components, and upgrade guidance for the self-managed version.
  • Gitea: Verify the selected installation method, database, and data-directory configuration.

References

Community & Resources

Original source: 16IDC Original ↗