Gerrit performance tuning is usually less about a single magic setting and more about systematic diagnosis across Git traffic, indexing, JVM behavior, storage, and database latency. This guide is for DevOps and platform engineers who need a fast, repeatable way to investigate slow reviews, delayed indexing, or sluggish push operations.
Originally published on 2015-11-12; fully revised and updated.

Original reference from the earlier post: Gerrit Performance CheatSheet (PDF).
A practical way to tune Gerrit performance
Treat tuning as an iterative loop: baseline, isolate one bottleneck, apply one change, and measure again. This keeps troubleshooting objective and prevents regressions caused by multiple simultaneous changes.
flowchart TD
A[Capture baseline metrics] --> B[Identify slow user action]
B --> C[Map issue to layer]
C --> D[Apply one change]
D --> E[Measure again]
E --> F{Improved and stable}
F -- no --> C
F -- yes --> G[Document and monitor]
Where Gerrit bottlenecks usually appear
| Layer | Common symptom | What to check first | Typical next action |
|---|---|---|---|
| Git receive path | Slow push to review refs | CPU, disk IOPS, receive queue depth | Reduce host contention and verify repository storage performance |
| Indexing and search | Search results delayed or slow | Index backlog and indexing worker activity | Tune indexing capacity and monitor index health |
| Database | UI/API latency spikes | DB latency, connection pool pressure, slow queries | Optimize DB performance and pool sizing |
| Caches | Repeated expensive lookups | Cache hit ratio and churn | Adjust cache sizing with memory limits in mind |
| JVM and GC | Periodic pauses or throughput drops | Heap usage and GC pause behavior | Right-size heap and review GC strategy |
| Front door HTTP or SSH | Intermittent request slowdown | Thread or connection saturation | Tune concurrency and proxy or load balancer limits |
Troubleshooting tools compared
| Tool or source | Best for | Strength | Limitation |
|---|---|---|---|
| Gerrit SSH admin commands | Live server internals such as queues and caches | Fast, service-specific visibility | Command availability can vary by version and setup |
| OS tools (vmstat, iostat, top) | CPU, memory, disk, and load diagnosis | Always useful for first-pass triage | Not Gerrit-specific context |
| JVM tools (jcmd, jstat) | Heap and garbage-collection behavior | Pinpoints Java runtime pressure | Needs JVM access and interpretation skill |
| Database monitoring | Query and connection bottlenecks | Identifies backend latency root causes | Requires DB-side observability |
| Reverse proxy or load balancer metrics | Request concurrency and frontend pressure | Shows ingress saturation patterns | Can hide backend details if used alone |
Command examples for a safe tuning cycle
1) Capture a quick host baseline
uptime
vmstat 1 5
iostat -xz 1 5
free -m
df -h
ulimit -n
2) Inspect Gerrit internals from SSH admin interface
Use these only if the SSH admin interface is enabled and your account has permission.
ssh -p 29418 admin@review.example.com gerrit show-caches
ssh -p 29418 admin@review.example.com gerrit show-queue
ssh -p 29418 admin@review.example.com gerrit show-connectionsCode language: CSS (css)
3) Validate user-facing push latency
time git push origin HEAD:refs/for/main
4) Example JVM sizing pattern
Exact file paths and startup conventions depend on installation method and operating system.
JAVA_OPTIONS="-Xms2g -Xmx2g -XX:+UseG1GC -XX:MaxGCPauseMillis=200"Code language: JavaScript (javascript)
Best practices
- Baseline first, then change one variable at a time.
- Correlate Gerrit metrics with OS, JVM, and database metrics before tuning.
- Prefer repeatable load patterns for validation instead of one-off manual checks.
- Track every tuning change with timestamp, reason, and rollback plan.
- Re-check performance after upgrades because defaults and internals can change by version.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals