Skip to content

Commit 513739d

Browse files
Merge pull request #2614 from odidev/clickhouse_LP
Deploy ClickHouse on Google Cloud C4A (Arm-based Axion VMs)
2 parents 0eab726 + 0baba7c commit 513739d

8 files changed

Lines changed: 746 additions & 0 deletions

File tree

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: Deploy ClickHouse on Google Cloud C4A (Arm-based Axion VMs)
3+
4+
minutes_to_complete: 30
5+
6+
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.
7+
8+
learning_objectives:
9+
- Provision an Arm-based SUSE SLES virtual machine on Google Cloud (C4A with Axion processors)
10+
- Install ClickHouse on a SUSE Arm64 (C4A) instance
11+
- Verify ClickHouse functionality by starting the server, connecting via client, and performing baseline data insertion and simple query tests on the Arm64 VM
12+
- Measure ClickHouse query performance (read, aggregation, and concurrent workloads) to evaluate throughput and latency on Arm64 (Aarch64)
13+
14+
prerequisites:
15+
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled
16+
- Basic familiarity with [ClickHouse](https://clickhouse.com/)
17+
author: Pareena Verma
18+
19+
##### Tags
20+
skilllevels: Introductory
21+
subjects: Databases
22+
cloud_service_providers: Google Cloud
23+
24+
armips:
25+
- Neoverse
26+
27+
tools_software_languages:
28+
- ClickHouse
29+
- clickhouse-benchmark
30+
31+
operatingsystems:
32+
- Linux
33+
34+
# ================================================================================
35+
# FIXED, DO NOT MODIFY
36+
# ================================================================================
37+
further_reading:
38+
- resource:
39+
title: Google Cloud documentation
40+
link: https://cloud.google.com/docs
41+
type: documentation
42+
43+
- resource:
44+
title: ClickHouse documentation
45+
link: https://clickhouse.com/docs/
46+
type: documentation
47+
48+
- resource:
49+
title: ClickHouse benchmark documentation
50+
link: https://clickhouse.com/docs/operations/utilities/clickhouse-benchmark
51+
type: documentation
52+
53+
weight: 1
54+
layout: "learningpathall"
55+
learning_path_main_page: "yes"
56+
---
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: Getting started with ClickHouse on Google Axion C4A (Arm Neoverse-V2)
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+
## ClickHouse
18+
19+
ClickHouse is an open-source, columnar OLAP database designed for **high-performance analytics** and real-time reporting. It supports **vectorized execution, columnar storage, and distributed deployments** for fast queries on large datasets. It offers **scalable, fault-tolerant architecture** with support for replication and sharding.
20+
21+
Ideal for analytics, monitoring, and event processing, ClickHouse runs efficiently on both x86 and Arm-based platforms, including AWS Graviton and GCP Arm VMs.
22+
23+
Learn more at the [ClickHouse website](https://clickhouse.com/).
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
---
2+
title: ClickHouse Baseline Testing on Google Axion C4A Arm Virtual Machine
3+
weight: 5
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## ClickHouse Baseline Testing on GCP SUSE VMs
10+
This section validates that ClickHouse is functioning correctly and provides a **basic performance baseline** on a SUSE Linux Arm64 VM.
11+
12+
13+
### Verify ClickHouse is running
14+
15+
```console
16+
sudo systemctl status clickhouse-server
17+
```
18+
19+
This confirms that the ClickHouse server is running correctly under systemd and ready to accept connections.
20+
21+
```output
22+
● clickhouse-server.service - ClickHouse Server
23+
Loaded: loaded (/etc/systemd/system/clickhouse-server.service; enabled; vendor preset: disabled)
24+
Active: active (running) since Thu 2025-11-27 05:07:42 UTC; 18s ago
25+
Main PID: 4229 (ClickHouseWatch)
26+
Tasks: 814
27+
CPU: 2.629s
28+
CGroup: /system.slice/clickhouse-server.service
29+
├─ 4229 clickhouse-watchdog server --config=/etc/clickhouse-server/config.xml
30+
└─ 4237 /usr/bin/clickhouse server --config=/etc/clickhouse-server/config.xml
31+
```
32+
33+
### Connect to ClickHouse
34+
Client connection ensures that the ClickHouse CLI can successfully communicate with the running server.
35+
36+
```console
37+
clickhouse client
38+
```
39+
### Create a test database and table
40+
Database and table creation sets up a dedicated test environment and an analytics-optimized MergeTree table for baseline evaluation.
41+
42+
```sql
43+
CREATE DATABASE baseline_test;
44+
USE baseline_test;
45+
```
46+
47+
You should see an output similar to:
48+
```output
49+
CREATE DATABASE baseline_test
50+
Query id: bc615167-ecd5-4470-adb0-918d8ce07caf
51+
Ok.
52+
0 rows in set. Elapsed: 0.012 sec.
53+
54+
55+
USE baseline_test
56+
Query id: cd49553a-c0ff-4656-a3e5-f0e9fccd9eba
57+
Ok.
58+
0 rows in set. Elapsed: 0.001 sec.
59+
```
60+
Create a simple table optimized for analytics:
61+
62+
```sql
63+
CREATE TABLE events
64+
(
65+
event_time DateTime,
66+
user_id UInt64,
67+
event_type String
68+
)
69+
ENGINE = MergeTree
70+
ORDER BY (event_time, user_id);
71+
```
72+
73+
You should see an output similar to:
74+
```output
75+
Query id: 62ce9b9c-9a7b-45c8-9a58-fa6302b13a88
76+
77+
Ok.
78+
79+
0 rows in set. Elapsed: 0.011 sec.
80+
```
81+
82+
### Insert baseline test data
83+
Data insertion loads a small, controlled dataset to simulate real event data and validate write functionality.
84+
Insert sample data (10,000 rows):
85+
86+
```sql
87+
INSERT INTO events
88+
SELECT
89+
now() - number,
90+
number,
91+
'click'
92+
FROM numbers(10000);
93+
```
94+
95+
You should see an output similar to:
96+
```output
97+
Query id: af860501-d903-4226-9e10-0e34467f7675
98+
99+
Ok.
100+
101+
10000 rows in set. Elapsed: 0.003 sec. Processed 10.00 thousand rows, 80.00 KB (3.36 million rows/s., 26.86 MB/s.)
102+
Peak memory usage: 3.96 MiB.
103+
```
104+
105+
**Verify row count:**
106+
107+
Row count validation verifies that the inserted data is stored correctly and consistently.
108+
109+
```sql
110+
SELECT count(*) FROM events;
111+
```
112+
113+
You should see an output similar to:
114+
```output
115+
Query id: 644f6556-e69b-4f98-98ec-483ee6869d6e
116+
117+
┌─count()─┐
118+
1. │ 10000 │
119+
└─────────┘
120+
121+
1 row in set. Elapsed: 0.002 sec.
122+
```
123+
124+
### Baseline read performance test
125+
Baseline read queries measure basic query performance for filtering, aggregation, and grouping, establishing an initial performance reference on the Arm64 VM.
126+
127+
- Run simple analytical queries:
128+
129+
```sql
130+
SELECT count(*) FROM events WHERE event_type = 'click';
131+
```
132+
133+
You should see an output similar to:
134+
```output
135+
Query id: bd609de4-c08e-4f9f-804a-ee0528c94e4d
136+
137+
┌─count()─┐
138+
1. │ 10000 │
139+
└─────────┘
140+
141+
1 row in set. Elapsed: 0.003 sec. Processed 10.00 thousand rows, 130.00 KB (2.98 million rows/s., 38.71 MB/s.)
142+
Peak memory usage: 392.54 KiB.
143+
```
144+
145+
- This query groups events by date and counts how many events occurred on each day, returning a daily summary of total events in chronological order.
146+
147+
```sql
148+
SELECT
149+
toDate(event_time) AS date,
150+
count(*) AS total_events
151+
FROM events
152+
GROUP BY date
153+
ORDER BY date;
154+
```
155+
156+
You should see an output similar to:
157+
```output
158+
Query id: b3db69f8-c885-419f-9900-53d258f0b996
159+
160+
┌───────date─┬─total_events─┐
161+
1. │ 2025-11-27 │ 10000 │
162+
└────────────┴──────────────┘
163+
164+
1 row in set. Elapsed: 0.002 sec. Processed 10.00 thousand rows, 40.00 KB (4.08 million rows/s., 16.33 MB/s.)
165+
Peak memory usage: 785.05 KiB.
166+
```
167+
168+
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.

0 commit comments

Comments
 (0)