Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: Deploy Gerrit on Google Cloud C4A
description: Learn how to install and configure Gerrit on Google Cloud Axion C4A Arm64 instances and benchmark its performance
minutes_to_complete: 30

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.

learning_objectives:
- Provision an Arm-based Ubuntu 24.04 LTS virtual machine on Google Cloud (C4A with Axion processors)
- Install Gerrit Server on the Ubuntu arm64 (C4A) instance
- Verify Gerrit deployment by accessing the web console
- Benchmark Gerrit by measuring operations per second (ops/sec), memory utilization, and disk performance on the Arm platform

prerequisites:
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled
- Basic familiarity with [Gerrit](https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough-github.html)

author: Doug Anson

##### Tags
skilllevels: Introductory
subjects: Databases
cloud_service_providers:
- Google Cloud

armips:
- Neoverse

tools_software_languages:
- Gerrit

operatingsystems:
- Linux

# ================================================================================
# FIXED, DO NOT MODIFY
# ================================================================================
further_reading:
- resource:
title: Google Cloud documentation
link: https://cloud.google.com/docs
type: documentation

- resource:
title: Gerrit documentation
link: https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough-github.html
type: documentation

weight: 1
layout: "learningpathall"
learning_path_main_page: "yes"
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# ================================================================================
# FIXED, DO NOT MODIFY THIS FILE
# ================================================================================
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
title: "Next Steps" # Always the same, html page title.
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Get started with Gerrit on Google Axion C4A

weight: 2

layout: "learningpathall"
---

## Google Axion C4A Arm instances in Google Cloud

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.

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.

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.

## Gerrit

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.

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.

For more information on [Gerrit](https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough-github.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
---
title: Benchmark Gerrit
weight: 6

### FIXED, DO NOT MODIFY
layout: learningpathall
---


## Overview
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.

## Download and Install the benchmarking script

Clone the following repo into your VM:

```bash
cd $HOME
git clone https://github.com/DougAnsonAustinTx/gerrit_test
```

## Run Benchmark

Run the benchmark:

```bash
cd $HOME/gerrit_test
chmod 755 *.sh
sudo SYNTH_PROFILE=production_like REQUIRE_GERRIT_METRICS=true ./gerrit_perf_test.sh
```

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):

```json
{
"run": {
"run_id": "20260622T152549Z",
"timestamp_utc": "2026-06-22T15:35:19Z",
"host": "douans01-gerrit-arm-6.c.arm-deveco-stedvsl-prd.internal",
"os": "Debian GNU/Linux 13 (trixie)"
},
"software": {
"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) ",
"gerrit_version": "gerrit version 3.11.2",
"gerrit_base_url": "http://127.0.0.1:8080",
"gerrit_test_http_user": "admin",
"prometheus_url": "http://127.0.0.1:9090",
"gerrit_metrics_url": "http://127.0.0.1:8080/plugins/metrics-reporter-prometheus/metrics",
"gerrit_metrics_probe_status": "ok",
"gerrit_metrics_auth_mode": "bearer"
},
"workload": {
"test_duration_seconds_per_step": 120,
"concurrency_steps": "2,1,1 4,2,1 6,3,2 8,4,2",
"legacy_single_step_defaults": {
"rest_concurrency": 6,
"git_clone_concurrency": 3,
"git_push_concurrency": 2
},
"synthetic_profile": "production_like",
"synthetic_projects": 8,
"synthetic_initial_files_per_project": 300,
"synthetic_initial_commits_per_project": 50,
"synthetic_review_changes_per_project": 40,
"synthetic_large_files_per_project": 8,
"synthetic_large_file_kb": 1024
},
"startup_state": {
"initial_gerrit_was_running": "true"
},
"operation_summary": [
{
"type": "git_clone",
"count": 4301,
"ok_count": 4301,
"fail_count": 0,
"min_ms": 105,
"avg_ms": 244.42269239711695,
"p50_ms": 220,
"p90_ms": 418,
"p95_ms": 456,
"p99_ms": 521,
"max_ms": 611
},
{
"type": "git_push_refs_for",
"count": 570,
"ok_count": 570,
"fail_count": 0,
"min_ms": 75,
"avg_ms": 157.13333333333333,
"p50_ms": 155,
"p90_ms": 222,
"p95_ms": 239,
"p99_ms": 288,
"max_ms": 344
},
{
"type": "rest_change_query",
"count": 42992,
"ok_count": 42992,
"fail_count": 0,
"min_ms": 12,
"avg_ms": 31.553265723855603,
"p50_ms": 30,
"p90_ms": 50,
"p95_ms": 56,
"p99_ms": 69,
"max_ms": 105
}
]
// rest of file omitted for brevity...
}
```

This JSON file can be processed to create a summary of the performance of Gerrit on our Axion C4A VM.

## Performance summary

The benchmark run completed successfully on the production-like profile with Gerrit metrics enabled. It
recorded 47,863 measured client operations over four 120-second steps, with 47,863 successes and zero failures.
The benchmark gives a high-quality performance view: client latency, stepwise concurrency behavior, node
CPU/memory/disk, and Gerrit-side JVM, GC, Jetty, cache, queue, Git, REST, NoteDB, and receive-commits metrics
are all present:

![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")

Client-visible correctness is excellent: all 47,863 measured operations succeeded. REST query latency remains low
with p99 69 ms. Clone is the dominant pressure point at p99 521 ms, and push remains sub-second at p99 288 ms:

![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")

The useful capacity signal is the flattening throughput curve after step 2. CPU is already near saturation in step 2, then
stays around 99% in steps 3 and 4. Latency continues rising: clone p99 increases from 221 ms in step 2 to 550 ms in
step 4, while aggregate throughput only rises from 103.3 to 108.4 ops/sec:

![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")

Host CPU pressure:

![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")

Gerrit server-side correlation observations:

![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")

Basic Server Metrics:

![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")
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: Create a firewall rule on GCP
weight: 3

### FIXED, DO NOT MODIFY
layout: learningpathall
---

## Overview

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.

{{% notice Note %}}
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/).
{{% /notice %}}

## Create a firewall rule in GCP
To expose TCP port 8080 for Gerrit, start by creating a new firewall rule in Google Cloud Console:

- Open the [Google Cloud Console](https://console.cloud.google.com/).
- In the navigation menu, select **VPC network** > **Firewall**.
- Select **Create firewall rule**.

You'll use this rule to allow incoming traffic on TCP port 8080, which is required for Gerrit access on your Arm-based VM.

![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")

- Set **Name** to `allow-tcp-8080`.
- Select the network you want to use for your VM. The default is `autoscaling-net`, but your organization might use a different network.
- Set **Direction of traffic** to **Ingress**.
- Set **Action on match** to **Allow**.
- For **Targets**, select **Specified target tags** and enter `allow-tcp-8080` in the **Target tags** field.
- In **Source IPv4 ranges**, enter `0.0.0.0/0`.

This configuration allows incoming TCP traffic on port 8080 from any IPv4 address.

![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")

## Specify protocols and ports

Next, configure the protocols and ports for your firewall rule:

- Under **Protocols and ports**, select **Specified protocols and ports**.
- Check the **TCP** box.
- In the **Ports** field, enter `8080`.
- Select **Create** to finish adding the firewall rule.

This step ensures that only TCP traffic on port 8080 is allowed through the firewall.

![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")

Your network firewall rule has now been created. You're ready to continue with VM creation.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: Install Gerrit
weight: 5

### FIXED, DO NOT MODIFY
layout: learningpathall
---

## Install Gerrit on GCP VM
This section walks you through how to install and configure Gerrit Server on a GCP Linux VM (Ubuntu 24.04 LTS based VM).

To ensure a successful setup, follow each step in order and check the output after each command. This helps you catch issues early and confirms that Gerrit is installed and running correctly.

## Set up your environment
Before installing Gerrit, update the system and install the required tools:

```console
sudo apt update
sudo apt -y dist-upgrade
sudo apt install -y wget curl default-jdk git net-tools
sudo apt install -y python3-pip python3-venv python3-dev pipenv
sudo apt update && sudo apt upgrade -y
sudo apt install ca-certificates curl gnupg wget -y
```

## Download and Setup/Install Gerrit server
Download the Gerrit server package for ARM64 architecture.

```console
mkdir -p ${HOME}/gerrit
wget -O gerrit.war https://gerrit-releases.storage.googleapis.com/gerrit-3.14.0.war
java -jar gerrit.war init -d ${HOME}/gerrit --dev --batch --install-all-plugins
```

## Verify service status:
```console
ps -ef | grep Gerrit
```

You should see similar output:
```output
doug_an+ 11807 1 18 21:01 ? 00:00:14 GerritCodeReview -Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance -Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance -jar /home/doug_anson_arm_com/gerrit/bin/gerrit.war daemon -d /home/doug_anson_arm_com/gerrit --run-id=1781730091.11737
```

## Check required ports

To confirm Gerrit is ready to accept connections, check that the required ports are open and listening. If you see "LISTEN" next to these ports, Gerrit is running and network services are available.

Gerrit uses port 8080 for its web console function.

Run the following command to verify the ports are active:

```console
netstat -a | grep http | grep LISTEN
```

The output is similar to:

```output
tcp6 0 0 [::]:http-alt [::]:* LISTEN
```

If you see "LISTEN" for the "http-alt" port, Gerrit is ready for baseline testing and further configuration. This confirms that the core Gerrit services are running and accessible on your Arm-based GCP VM.

## Confirm that the Gerrit dashboard is accessible

Using a browser and the "Public IP Address" saved off when the VM instance was created, go to the following URL in the browser:

```output
http://my_vm_public_ip_address:8080
```

You should see output similar to this:

![Gerrit web console dashboard showing the main interface with navigation menu and project/change options available.#center](images/gerrit-dashboard.png "Gerrit Dashboard")

In the next section, basic performance testing of Gerrit will be performed.
Loading
Loading