Skip to content

Commit 705ebca

Browse files
Merge pull request #2627 from DougAnsonAustinTX/clickhouse_LP_techreview_updates
ClickHouse on GCP LP techrevriew updates
2 parents 8bef8b4 + 5ef977e commit 705ebca

7 files changed

Lines changed: 66 additions & 44 deletions

File tree

content/learning-paths/servers-and-cloud-computing/clickhouse-gcp/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
22
title: Deploy ClickHouse on Google Cloud C4A (Arm-based Axion VMs)
33

4+
draft: true
5+
cascade:
6+
draft: true
7+
48
minutes_to_complete: 30
59

610
who_is_this_for: This learning path is intended for software developers deploying and optimizing ClickHouse on Linux/Arm64 environments, specifically using Google Cloud C4A virtual machines powered by Axion processors.

content/learning-paths/servers-and-cloud-computing/clickhouse-gcp/baseline.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,10 @@ Query id: b3db69f8-c885-419f-9900-53d258f0b996
165165
Peak memory usage: 785.05 KiB.
166166
```
167167

168+
Exit the client:
169+
170+
```console
171+
exit;
172+
```
173+
168174
The baseline tests confirm that ClickHouse is stable, functional, and performing efficiently on the Arm64 VM. With core operations validated, the setup is now ready for detailed performance benchmarking.

content/learning-paths/servers-and-cloud-computing/clickhouse-gcp/benchmarking.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -249,17 +249,7 @@ localhost:9000, queries: 5, QPS: 20.935, RPS: 10467305.309, MiB/s: 79.859, resul
249249
- **Result RPS / Result MiB/s:** Reflects the size and rate of returned query results. Low values are expected for aggregate queries like `COUNT(*)`.
250250
- **Insert Benchmark Metrics:** Write tests measure ingestion speed and stability, where consistent latency indicates reliable bulk insert performance.
251251
252-
### Benchmark summary on x86_64
253-
To compare the benchmark results, the following results were collected by running the same benchmark on an `x86 - c4-standard-4` (4 vCPUs, 15 GB Memory) x86_64 VM in GCP, running SUSE:
254-
255-
| Test Category | Test Case | Query / Operation | Iterations | Concurrency | QPS | Rows / sec (RPS) | Throughput (MiB/s) | p50 Latency | p95 Latency | p99 Latency |
256-
| ----------------------- | -------------- | ---------------------------------------------------------------------------------- | ---------- | ----------- | ------ | ---------------- | ------------------ | ----------- | ----------- | ----------- |
257-
| Read | Filtered COUNT | `SELECT COUNT(*) FROM bench.hits WHERE url LIKE '/page/%'` | 10 | 1 | 63.22 | 63.22 M | 958.68 | 4 ms | 6 ms | 6 ms |
258-
| Read / Aggregate | GROUP BY | `SELECT url, COUNT(*) FROM bench.hits GROUP BY url` | 10 | 2 | 67.23 | 67.23 M | 1019.43 | 7 ms | 8 ms | 8 ms |
259-
| Read (High Concurrency) | Filtered COUNT | `SELECT COUNT(*) FROM bench.hits WHERE user_id % 10 = 0` | 20 | 8 | 102.54 | 102.54 M | 782.31 | 23 ms | 54 ms | 60 ms |
260-
| Write | Bulk Insert | `INSERT INTO bench.hits SELECT now(), rand64(), '/benchmark' FROM numbers(500000)` | 5 | 4 | 22.09 | 11.04 M | 84.25 | 80 ms | 81 ms | 81 ms |
261-
262-
### Benchmark summary on Arm64
252+
### Benchmark summary
263253
Results from the earlier run on the `c4a-standard-4` (4 vCPU, 16 GB memory) Arm64 VM in GCP (SUSE):
264254
265255
| Test Category | Test Case | Query / Operation | Iterations | Concurrency | QPS | Rows / sec (RPS) | Throughput (MiB/s) | p50 Latency | p95 Latency | p99 Latency |
@@ -269,8 +259,6 @@ Results from the earlier run on the `c4a-standard-4` (4 vCPU, 16 GB memory) Arm6
269259
| Read (High Concurrency) | Filtered COUNT | `COUNT(*) WHERE user_id % 10 = 0` | 20 | 8 | 99.72 | 99.72 M | 760.83 | 29 ms | 63 ms | 78 ms |
270260
| Write | Bulk Insert | `INSERT SELECT … FROM numbers(500000)` | 5 | 4 | 20.94 | 10.47 M | 79.86 | 68 ms | 73 ms | 73 ms |
271261
272-
### ClickHouse Benchmark comparison insights
273-
274262
- **High Read Throughput:** Simple filtered reads and aggregations achieved over **63–67 million rows/sec**, demonstrating strong scan and aggregation performance on Arm64.
275263
- **Scales Under Concurrency:** At higher concurrency (8 clients), the system sustained nearly **100 million rows/sec**, showing efficient parallel execution and CPU utilization.
276264
- **Fast Aggregations:** `GROUP BY` workloads delivered over **1 GiB/s throughput** with low single-digit millisecond latency at moderate concurrency.
22.3 KB
Loading
12.5 KB
Loading

content/learning-paths/servers-and-cloud-computing/clickhouse-gcp/installation.md

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,21 @@ layout: learningpathall
99
## Install ClickHouse on GCP VM
1010
This guide covers installing, configuring, and validating ClickHouse on a GCP SUSE Linux Arm64 VM. It includes system preparation, installing ClickHouse with the official installer, verifying the setup, starting the server, and connecting via the client. The guide also configures ClickHouse as a systemd service to ensure reliable, automatic startup on Arm-based environments.
1111

12-
### Install required system packages
12+
### Install required system packages and the ClickHouse repo
1313
Refresh system repositories and install basic utilities needed to download and run ClickHouse.
1414

1515
```console
1616
sudo zypper refresh
17-
sudo zypper install -y curl tar gzip sudo
17+
sudo zypper addrepo -r https://packages.clickhouse.com/rpm/clickhouse.repo -g
18+
sudo zypper --gpg-auto-import-keys refresh clickhouse-stable
1819
```
1920

20-
### Download ClickHouse using the official installer
21-
Download the official ClickHouse installation script, which works for both x86 and ARM64 systems.
21+
### Install ClickHouse via the ClickHouse repo
22+
Download and install ClickHouse for SuSE systems:
2223

2324
```console
24-
curl https://clickhouse.com/ | sh
25-
```
26-
This command downloads the ClickHouse binary into the current directory.
27-
28-
### Install ClickHouse components
29-
Run the installer with root privileges to install all ClickHouse components.
30-
31-
```console
32-
sudo ./clickhouse install
33-
```
25+
sudo zypper install -y clickhouse-server clickhouse-client
26+
```
3427

3528
This installs:
3629

@@ -51,9 +44,9 @@ clickhouse local --version
5144

5245
You should see an output similar to:
5346
```output
54-
ClickHouse local version 25.12.1.168 (official build).
55-
ClickHouse server version 25.12.1.168 (official build).
56-
ClickHouse client version 25.12.1.168 (official build).
47+
ClickHouse local version 25.11.2.24 (official build).
48+
ClickHouse server version 25.11.2.24 (official build).
49+
ClickHouse client version 25.11.2.24 (official build).
5750
```
5851

5952
### Create ClickHouse user and directories
@@ -63,33 +56,30 @@ Create a dedicated system user and required directories for data, logs, and runt
6356
sudo useradd -r -s /sbin/nologin clickhouse || true
6457
sudo mkdir -p /var/lib/clickhouse
6558
sudo mkdir -p /var/log/clickhouse-server
66-
sudo mkdir -p /var/run/clickhouse-server
59+
sudo mkdir -p /var/run/clickhouse-client
6760
```
6861
Set proper ownership so ClickHouse can access these directories.
6962

7063
```console
7164
sudo chown -R clickhouse:clickhouse \
7265
/var/lib/clickhouse \
7366
/var/log/clickhouse-server \
74-
/var/run/clickhouse-server
67+
/var/run/clickhouse-client
68+
sudo chmod 755 /var/lib/clickhouse \
69+
/var/log/clickhouse-server \
70+
/var/run/clickhouse-client
7571
```
7672

77-
### Start ClickHouse Server manually (validation)
73+
### Start ClickHouse Server manually
7874
You can just run the ClickHouse server in the foreground to confirm the configuration is valid.
7975

8076
```console
81-
sudo clickhouse server --config-file=/etc/clickhouse-server/config.xml
77+
sudo -u clickhouse clickhouse server --config-file=/etc/clickhouse-server/config.xml
8278
```
8379
Keep this terminal open while testing.
8480

85-
### Start clickhouse-server with:
86-
Start ClickHouse using the built-in start command for normal operation.
87-
88-
```console
89-
sudo clickhouse start
90-
```
9181
### Connect using ClickHouse Client
92-
Open a new terminal and connect to the ClickHouse server.
82+
Open a new SSH terminal and connect to the ClickHouse server.
9383

9484
```console
9585
clickhouse client
@@ -106,12 +96,14 @@ SELECT version()
10696
Query id: ddd3ff38-c0c6-43c5-8ae1-d9d07af4c372
10797
10898
┌─version()───┐
109-
1. │ 25.12.1.168
99+
1. │ 25.11.2.24
110100
└─────────────┘
111101
112102
1 row in set. Elapsed: 0.001 sec.
113103
```
114104

105+
Please close the client SSH terminal and press "ctrl-c" in the server SSH terminal to halt the manual invocation of ClickHouse. FYI, the server may take a few seconds to close down when "ctrl-c" is received.
106+
115107
{{% notice Note %}}
116108
Recent benchmarks show that ClickHouse (v22.5.1.2079-stable) delivers up to 26% performance improvements on Arm-based platforms, such as AWS Graviton3, compared to other architectures, highlighting the efficiency of its vectorized execution engine on modern Arm CPUs.
117109
You can view [this Blog](https://community.arm.com/arm-community-blogs/b/servers-and-cloud-computing-blog/posts/improve-clickhouse-performance-up-to-26-by-using-aws-graviton3)
@@ -144,18 +136,38 @@ EOF
144136
**Reload systemd and enable the service:**
145137

146138
```console
147-
sudo systemctl daemon-reload
148139
sudo systemctl enable clickhouse-server
149140
sudo systemctl start clickhouse-server
141+
sudo systemctl daemon-reload
150142
```
151143

144+
{{% notice Note %}}
145+
You may get the following error which can be safely ignored:
146+
147+
"ln: failed to create symbolic link '/etc/init.d/rc2.d/S50clickhouse-server': No such file or directory"
148+
{{% /notice %}}
149+
152150
### Verify ClickHouse service
153151
Ensure the ClickHouse server is running correctly as a background service.
154152

155153
```console
156154
sudo systemctl status clickhouse-server
157155
```
158156

157+
This confirms that the ClickHouse server is running correctly under systemd and ready to accept connections.
158+
159+
```output
160+
● clickhouse-server.service - ClickHouse Server
161+
Loaded: loaded (/etc/systemd/system/clickhouse-server.service; enabled; vendor preset: disabled)
162+
Active: active (running) since Thu 2025-11-27 05:07:42 UTC; 18s ago
163+
Main PID: 4229 (ClickHouseWatch)
164+
Tasks: 814
165+
CPU: 2.629s
166+
CGroup: /system.slice/clickhouse-server.service
167+
├─ 4229 clickhouse-watchdog server --config=/etc/clickhouse-server/config.xml
168+
└─ 4237 /usr/bin/clickhouse server --config=/etc/clickhouse-server/config.xml
169+
```
170+
159171
### Final validation
160172
Reconnect to ClickHouse and confirm it is operational.
161173

content/learning-paths/servers-and-cloud-computing/clickhouse-gcp/instance.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ To create a virtual machine based on the C4A instance type:
2626

2727
![Create a Google Axion C4A Arm virtual machine in the Google Cloud Console with c4a-standard-4 selected alt-text#center](images/gcp-vm.png "Creating a Google Axion C4A Arm virtual machine in Google Cloud Console")
2828

29-
- Under **OS and Storage**, select **Change**, then choose an Arm64-based OS image. For this Learning Path, use **SUSE Linux Enterprise Server**. Pick the preferred version for your Operating System. Ensure you select the **Arm image** variant. Click **Select**.
29+
30+
- Under **OS and Storage**, select **Change**, then choose an Arm64-based OS image. For this Learning Path, use **SUSE Linux Enterprise Server**.
31+
- If using use **SUSE Linux Enterprise Server**. Select "Pay As You Go" for the license type.
32+
- Once appropriately selected and configured, please Click **Select**.
3033
- Under **Networking**, enable **Allow HTTP traffic**.
3134
- Click **Create** to launch the instance.
35+
- Once created, you should see a "SSH" option to the right in your list of VM instances. Click on this to launch a SSH shell into your VM instance:
36+
37+
![Invoke a SSH session via your browser alt-text#center](images/gcp-ssh.png "Invoke a SSH session into your running VM instance")
38+
39+
- A window from your browser should come up and you should now see a shell into your VM instance:
40+
41+
![Terminal Shell in your VM instance alt-text#center](images/gcp-shell.png "Terminal shell in your VM instance")
42+
43+
Next, let's install ClickHouse!

0 commit comments

Comments
 (0)