Skip to content

Commit 7d3c8d7

Browse files
Merge pull request #3414 from DougAnsonAustinTX/gerrit-lp-content
Gerrit LP draft content
2 parents c922656 + b11c351 commit 7d3c8d7

21 files changed

Lines changed: 410 additions & 0 deletions
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Deploy Gerrit on Google Cloud C4A
3+
description: Learn how to install and configure Gerrit on Google Cloud Axion C4A Arm64 instances and benchmark its performance
4+
minutes_to_complete: 30
5+
6+
who_is_this_for: This is an introductory topic for developers deploying Gerrit in Arm Linux environments, specifically using Google Cloud C4A virtual machines (VM) powered by Axion processors.
7+
8+
learning_objectives:
9+
- Provision an Arm-based Ubuntu 24.04 LTS virtual machine on Google Cloud (C4A with Axion processors)
10+
- Install Gerrit Server on the Ubuntu arm64 (C4A) instance
11+
- Verify Gerrit deployment by accessing the web console
12+
- Benchmark Gerrit by measuring operations per second (ops/sec), memory utilization, and disk performance on the Arm platform
13+
14+
prerequisites:
15+
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled
16+
- Basic familiarity with [Gerrit](https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough-github.html)
17+
18+
author: Doug Anson
19+
20+
##### Tags
21+
skilllevels: Introductory
22+
subjects: Databases
23+
cloud_service_providers:
24+
- Google Cloud
25+
26+
armips:
27+
- Neoverse
28+
29+
tools_software_languages:
30+
- Gerrit
31+
32+
operatingsystems:
33+
- Linux
34+
35+
# ================================================================================
36+
# FIXED, DO NOT MODIFY
37+
# ================================================================================
38+
further_reading:
39+
- resource:
40+
title: Google Cloud documentation
41+
link: https://cloud.google.com/docs
42+
type: documentation
43+
44+
- resource:
45+
title: Gerrit documentation
46+
link: https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough-github.html
47+
type: documentation
48+
49+
weight: 1
50+
layout: "learningpathall"
51+
learning_path_main_page: "yes"
52+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# ================================================================================
3+
# FIXED, DO NOT MODIFY THIS FILE
4+
# ================================================================================
5+
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
6+
title: "Next Steps" # Always the same, html page title.
7+
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
8+
---
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Get started with Gerrit on Google Axion C4A
3+
4+
weight: 2
5+
6+
layout: "learningpathall"
7+
---
8+
9+
## Google Axion C4A Arm instances in Google Cloud
10+
11+
Google Axion C4A is a family of Arm-based virtual machines built on Google’s custom Axion CPU, which is based on Arm Neoverse-V2 cores. Designed for high-performance and energy-efficient computing, these virtual machines offer strong performance for modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.
12+
13+
The C4A series provides a cost-effective alternative to x86 virtual machines while leveraging the scalability and performance benefits of the Arm architecture in Google Cloud.
14+
15+
To learn more about Google Axion, refer to the [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu) blog.
16+
17+
## Gerrit
18+
19+
Gerrit is an open-source, web-based code review system for Git repositories that lets teams review proposed commits before they are merged into a codebase. It is especially useful for projects that want patchset-based reviews, inline comments, approval labels, fine-grained permissions, and integration with CI/CD systems before changes land.
20+
21+
To learn more, start with the official Gerrit site and documentation, especially the product overview and user guide, which explain how Gerrit fits into a development workflow and how to review, upload, and manage changes.
22+
23+
For more information on [Gerrit](https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough-github.html)
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
---
2+
title: Benchmark Gerrit
3+
weight: 6
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
10+
## Overview
11+
This section guides you through benchmarking basic Gerrit performance on our Axiom VM. The benchmark consists of a custom script that will exercise and time key Gerrit features/functions.
12+
13+
## Download and Install the benchmarking script
14+
15+
Clone the following repo into your VM:
16+
17+
```bash
18+
cd $HOME
19+
git clone https://github.com/DougAnsonAustinTx/gerrit_test
20+
```
21+
22+
## Run Benchmark
23+
24+
Run the benchmark:
25+
26+
```bash
27+
cd $HOME/gerrit_test
28+
chmod 755 *.sh
29+
sudo SYNTH_PROFILE=production_like REQUIRE_GERRIT_METRICS=true ./gerrit_perf_test.sh
30+
```
31+
32+
The benchmark script will run through some sample exercises that Gerrit supports and will capture performance data from those exercises and place them into a specified JSON file similar to this (partial omitted for brevity):
33+
34+
```json
35+
{
36+
"run": {
37+
"run_id": "20260622T152549Z",
38+
"timestamp_utc": "2026-06-22T15:35:19Z",
39+
"host": "douans01-gerrit-arm-6.c.arm-deveco-stedvsl-prd.internal",
40+
"os": "Debian GNU/Linux 13 (trixie)"
41+
},
42+
"software": {
43+
"java_version": "openjdk version \"21.0.11\" 2026-04-21 OpenJDK Runtime Environment (build 21.0.11+10-1-deb13u2-Debian) OpenJDK 64-Bit Server VM (build 21.0.11+10-1-deb13u2-Debian, mixed mode, sharing) ",
44+
"gerrit_version": "gerrit version 3.11.2",
45+
"gerrit_base_url": "http://127.0.0.1:8080",
46+
"gerrit_test_http_user": "admin",
47+
"prometheus_url": "http://127.0.0.1:9090",
48+
"gerrit_metrics_url": "http://127.0.0.1:8080/plugins/metrics-reporter-prometheus/metrics",
49+
"gerrit_metrics_probe_status": "ok",
50+
"gerrit_metrics_auth_mode": "bearer"
51+
},
52+
"workload": {
53+
"test_duration_seconds_per_step": 120,
54+
"concurrency_steps": "2,1,1 4,2,1 6,3,2 8,4,2",
55+
"legacy_single_step_defaults": {
56+
"rest_concurrency": 6,
57+
"git_clone_concurrency": 3,
58+
"git_push_concurrency": 2
59+
},
60+
"synthetic_profile": "production_like",
61+
"synthetic_projects": 8,
62+
"synthetic_initial_files_per_project": 300,
63+
"synthetic_initial_commits_per_project": 50,
64+
"synthetic_review_changes_per_project": 40,
65+
"synthetic_large_files_per_project": 8,
66+
"synthetic_large_file_kb": 1024
67+
},
68+
"startup_state": {
69+
"initial_gerrit_was_running": "true"
70+
},
71+
"operation_summary": [
72+
{
73+
"type": "git_clone",
74+
"count": 4301,
75+
"ok_count": 4301,
76+
"fail_count": 0,
77+
"min_ms": 105,
78+
"avg_ms": 244.42269239711695,
79+
"p50_ms": 220,
80+
"p90_ms": 418,
81+
"p95_ms": 456,
82+
"p99_ms": 521,
83+
"max_ms": 611
84+
},
85+
{
86+
"type": "git_push_refs_for",
87+
"count": 570,
88+
"ok_count": 570,
89+
"fail_count": 0,
90+
"min_ms": 75,
91+
"avg_ms": 157.13333333333333,
92+
"p50_ms": 155,
93+
"p90_ms": 222,
94+
"p95_ms": 239,
95+
"p99_ms": 288,
96+
"max_ms": 344
97+
},
98+
{
99+
"type": "rest_change_query",
100+
"count": 42992,
101+
"ok_count": 42992,
102+
"fail_count": 0,
103+
"min_ms": 12,
104+
"avg_ms": 31.553265723855603,
105+
"p50_ms": 30,
106+
"p90_ms": 50,
107+
"p95_ms": 56,
108+
"p99_ms": 69,
109+
"max_ms": 105
110+
}
111+
]
112+
// rest of file omitted for brevity...
113+
}
114+
```
115+
116+
This JSON file can be processed to create a summary of the performance of Gerrit on our Axion C4A VM.
117+
118+
## Performance summary
119+
120+
The benchmark run completed successfully on the production-like profile with Gerrit metrics enabled. It
121+
recorded 47,863 measured client operations over four 120-second steps, with 47,863 successes and zero failures.
122+
The benchmark gives a high-quality performance view: client latency, stepwise concurrency behavior, node
123+
CPU/memory/disk, and Gerrit-side JVM, GC, Jetty, cache, queue, Git, REST, NoteDB, and receive-commits metrics
124+
are all present:
125+
126+
![Charts and graphs showing the Gerrit benchmark performance summary including operation counts, success rates, and latency metrics across the four 120-second test steps.#center](images/analysis.png "Gerrit Benchmark Summary")
127+
128+
Client-visible correctness is excellent: all 47,863 measured operations succeeded. REST query latency remains low
129+
with p99 69 ms. Clone is the dominant pressure point at p99 521 ms, and push remains sub-second at p99 288 ms:
130+
131+
![Performance metrics showing client-side operation summary with statistics for git_clone, git_push_refs_for, and rest_change_query operations, including latency percentiles and success rates.#center](images/client-summary.png "Client-side Operation Summary")
132+
133+
The useful capacity signal is the flattening throughput curve after step 2. CPU is already near saturation in step 2, then
134+
stays around 99% in steps 3 and 4. Latency continues rising: clone p99 increases from 221 ms in step 2 to 550 ms in
135+
step 4, while aggregate throughput only rises from 103.3 to 108.4 ops/sec:
136+
137+
![Graph showing throughput and latency trends across four concurrency steps, demonstrating how performance degrades as concurrency increases and CPU approaches saturation.#center](images/stepwise-summary.png "Stepwise Concurrency Behavior Summary")
138+
139+
Host CPU pressure:
140+
141+
![Chart displaying CPU usage metrics across the benchmark steps, showing how CPU pressure increases and stabilizes near saturation levels as concurrency increases.#center](images/cpu-pressure.png "CPU Pressure Summary")
142+
143+
Gerrit server-side correlation observations:
144+
145+
![Graph showing correlations between various Gerrit server-side metrics such as GC pressure, cache performance, and queue depths in relation to client request latency.#center](images/gerrit-correlation.png "Gerrit Server-side Correlation Findings")
146+
147+
Basic Server Metrics:
148+
149+
![Server metrics dashboard showing host resource utilization metrics including memory, disk I/O, and other system-level performance indicators during the benchmark run.#center](images/server-metrics.png "Basic Additional Server Metrics")
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Create a firewall rule on GCP
3+
weight: 3
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Overview
10+
11+
In this section you'll learn how to create a firewall rule in Google Cloud Console to allow traffic on TCP port 8080. This step is required for the Learning Path to ensure your Gerrit deployment is accessible.
12+
13+
{{% notice Note %}}
14+
If you need help setting up Google Cloud Platform (GCP), see the Learning Path [Getting started with Google Cloud Platform](/learning-paths/servers-and-cloud-computing/csp/google/).
15+
{{% /notice %}}
16+
17+
## Create a firewall rule in GCP
18+
To expose TCP port 8080 for Gerrit, start by creating a new firewall rule in Google Cloud Console:
19+
20+
- Open the [Google Cloud Console](https://console.cloud.google.com/).
21+
- In the navigation menu, select **VPC network** > **Firewall**.
22+
- Select **Create firewall rule**.
23+
24+
You'll use this rule to allow incoming traffic on TCP port 8080, which is required for Gerrit access on your Arm-based VM.
25+
26+
![Google Cloud Console showing the Create firewall rule page with Name set to allow-tcp-8080, Direction set to Ingress, Action set to Allow, Targets set to Specified target tags with allow-tcp-8080, and Source IPv4 ranges set to 0.0.0.0/0. These settings configure the firewall to allow incoming TCP traffic on port 8080 from any IPv4 address.#center](images/firewall-rule.png "Create a firewall rule")
27+
28+
- Set **Name** to `allow-tcp-8080`.
29+
- Select the network you want to use for your VM. The default is `autoscaling-net`, but your organization might use a different network.
30+
- Set **Direction of traffic** to **Ingress**.
31+
- Set **Action on match** to **Allow**.
32+
- For **Targets**, select **Specified target tags** and enter `allow-tcp-8080` in the **Target tags** field.
33+
- In **Source IPv4 ranges**, enter `0.0.0.0/0`.
34+
35+
This configuration allows incoming TCP traffic on port 8080 from any IPv4 address.
36+
37+
![Google Cloud Console showing the firewall rule configuration form with allow-tcp-8080 in the Name field, Ingress direction, Allow action, Specified target tags field with allow-tcp-8080, and Source IPv4 ranges set to 0.0.0.0/0. This configuration enables TCP port 8080 traffic for Gerrit access.#center](images/network-rule.png "Creating the TCP/8080 firewall rule")
38+
39+
## Specify protocols and ports
40+
41+
Next, configure the protocols and ports for your firewall rule:
42+
43+
- Under **Protocols and ports**, select **Specified protocols and ports**.
44+
- Check the **TCP** box.
45+
- In the **Ports** field, enter `8080`.
46+
- Select **Create** to finish adding the firewall rule.
47+
48+
This step ensures that only TCP traffic on port 8080 is allowed through the firewall.
49+
50+
![Google Cloud Console showing the Protocols and ports section with TCP checkbox selected and Ports field containing 8080. This ensures only TCP traffic on port 8080 is allowed through the firewall for Gerrit.#center](images/network-port.png "Specifying the TCP port to expose")
51+
52+
Your network firewall rule has now been created. You're ready to continue with VM creation.
39.8 KB
Loading
22.2 KB
Loading
46.7 KB
Loading
75.2 KB
Loading
23.5 KB
Loading

0 commit comments

Comments
 (0)