You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/clickhouse-gcp/benchmarking.md
+37-26Lines changed: 37 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,13 @@
1
1
---
2
-
title: ClickHouse Benchmarking on Google Axion (Arm)
2
+
title: Benchmark ClickHouse on Google Axion processors
3
3
weight: 9
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
+
## ClickHouse benchmarking on Axion processors
8
9
9
-
10
-
## ClickHouse Benchmarking on Axion Processors
11
-
This phase benchmarks **query latency on ClickHouse running on Google Axion (Arm64)**.
12
-
The goal is to measure **repeatable query latency** with a focus on **p95 latency**, using data ingested via the real-time Dataflow pipeline.
10
+
In this section you'll benchmark query latency on ClickHouse running on Google Axion (Arm64). The goal is to measure repeatable query latency with a focus on p95 latency, using data ingested with the real-time Dataflow pipeline.
13
11
14
12
## Prepare ClickHouse for Accurate Latency Measurement
15
13
@@ -23,13 +21,16 @@ SET use_query_cache = 0;
23
21
```
24
22
This ensures every query is executed fully and not served from cache.
25
23
26
-
### Validate Dataset Size
27
-
Ensures enough data is present to produce meaningful latency results.
24
+
### Validate dataset size
25
+
26
+
Ensure enough data is present to produce meaningful latency results by checking the current row count.
28
27
29
28
```console
30
29
SELECT count(*) FROM realtime.logs;
31
30
```
32
-
You should see an output similar to:
31
+
32
+
The output is similar to:
33
+
33
34
```output
34
35
┌─count()─┐
35
36
1. │ 5000013 │ -- 5.00 million
@@ -48,20 +49,22 @@ SELECT
48
49
FROM numbers(1000000);
49
50
```
50
51
51
-
You should see an output similar to:
52
+
The output is similar to:
53
+
52
54
```output
53
55
Query id: 8fcbefab-fa40-4124-8f23-516fca2b8fdd
54
56
Ok.
55
57
1000000 rows in set. Elapsed: 0.058 sec. Processed 1.00 million rows, 8.00 MB (17.15 million rows/s., 137.20 MB/s.)
56
58
Peak memory usage: 106.54 MiB.
57
59
```
58
60
59
-
### Define Benchmark Queries
61
+
### Define benchmark queries
62
+
60
63
These queries represent common real-time analytics patterns:
61
64
62
-
-**Filtered count** – service-level analytics
63
-
-**Time-windowed count** – recent activity
64
-
-**Aggregation by service** – grouped analytics
65
+
- Filtered count: service-level analytics
66
+
- Time-windowed count: recent activity
67
+
- Aggregation by service: grouped analytics
65
68
66
69
Each query scans and processes millions of rows to stress the execution engine.
To calculate reliable latency metrics, the same query is executed multiple times(10) using `clickhouse-client --time`.
152
+
### Run repeatable latency measurements
153
+
154
+
To calculate reliable latency metrics, execute the same query multiple times (10 iterations) using `clickhouse-client --time`.
149
155
150
156
```sql
151
157
clickhouse-client --time --query "
@@ -228,16 +234,18 @@ sort -n latency-results.txt
228
234
```
229
235
230
236
**Calculate p95 latency (manual):**
237
+
231
238
The p95 latency represents the value under which 95% of query executions complete.
232
239
233
240
**Formula:**
234
241
235
-
```pqsql
242
+
```
236
243
p95 index = ceil(0.95 × N)
237
244
```
238
245
239
246
For 10 samples:
240
-
```cpp
247
+
248
+
```
241
249
ceil(0.95 × 10) = ceil(9.5) = 10
242
250
```
243
251
@@ -249,12 +257,15 @@ The 10th value in the sorted list is your p95 latency.
249
257
p95 latency = 0.011 seconds ≈ 11 ms
250
258
```
251
259
252
-
The ClickHouse query was executed 10 times on a GCP Axion (Arm) VM. Observed p95 query latency was ~11 ms, demonstrating consistently low-latency analytical performance on Arm-based infrastructure.
260
+
After executing the ClickHouse query 10 times on the GCP Axion (Arm) VM, the observed p95 query latency was ~11 ms, demonstrating consistently low-latency analytical performance on Arm-based infrastructure.
253
261
254
-
### Benchmark summary
255
-
Results from the earlier run on the `c4a-standard-4` (4 vCPU, 16 GB memory) Arm64 VM in GCP (SUSE):
262
+
## What you've accomplished
256
263
257
-
- ClickHouse on **Google Axion (Arm64)** delivered consistently low query latency, even while scanning ~6 million rows per query.
258
-
- Across **10 repeat executions, the p95 latency was ~11 ms**, indicating stable and predictable performance.
264
+
You've successfully completed a comprehensive ClickHouse benchmarking exercise on Google Axion (Arm64) processors. Key results from the `c4a-standard-4` (4 vCPU, 16 GB memory) Arm64 VM running SUSE:
265
+
266
+
- ClickHouse on Google Axion (Arm64) delivered consistently low query latency, even while scanning ~6 million rows per query.
267
+
- Across 10 repeat executions, the p95 latency was ~11 ms, indicating stable and predictable performance.
259
268
- Disabling the query cache ensured true execution latency, not cache-assisted results.
Throughout this Learning Path, you provisioned an Arm-based VM on Google Cloud, deployed ClickHouse, configured a real-time streaming pipeline with Pub/Sub and Dataflow, and validated end-to-end analytical performance. You can now deploy, optimize, and benchmark ClickHouse workloads on Google Cloud Arm infrastructure.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/clickhouse-gcp/dataflow-streaming-etl.md
+27-19Lines changed: 27 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
1
---
2
-
title: Dataflow Streaming ETL to ClickHouse
2
+
title: Build a Dataflow streaming ETL pipeline to ClickHouse
3
3
weight: 8
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Dataflow Streaming ETL (Pub/Sub → ClickHouse)
10
-
This section implements a real-time streaming ETL pipeline that ingests events from Pub/Sub, processes them using Dataflow (Apache Beam), and writes them into ClickHouse running on a GCP Axion (Arm64) VM.
9
+
## Dataflow streaming ETL (Pub/Sub → ClickHouse)
11
10
12
-
## Pipeline Overview
13
-
Flow
11
+
In this section you'll implement a real-time streaming ETL pipeline that ingests events from Pub/Sub, processes them using Dataflow (Apache Beam), and writes them into ClickHouse running on a GCP Axion (Arm64) VM.
Before running Dataflow, confirm that messages can be published and pulled.
109
113
110
114
**Publish a test message:**
@@ -134,11 +138,9 @@ Successful output confirms:
134
138
- Subscription is readable
135
139
- IAM is functioning correctly
136
140
137
-
### Create Dataflow Streaming ETL Script
138
-
Create the Dataflow pipeline file:
141
+
### Create Dataflow streaming ETL script
139
142
140
-
Purpose
141
-
Defines a streaming Beam pipeline that:
143
+
Create the Dataflow pipeline file that defines a streaming Beam pipeline to:
142
144
143
145
- Reads JSON events from Pub/Sub
144
146
- Parses messages
@@ -208,8 +210,9 @@ gcloud pubsub subscriptions list
208
210
hostname -I
209
211
```
210
212
211
-
### Run the Dataflow Streaming Job
212
-
Launches the pipeline on managed Dataflow workers.
213
+
### Run the Dataflow streaming job
214
+
215
+
Launch the pipeline on managed Dataflow workers:
213
216
214
217
```console
215
218
python3.11 dataflow_etl.py \
@@ -233,8 +236,9 @@ Autoscaling is enabled for Dataflow Streaming Engine. Workers will scale between
233
236
- Streaming mode is active
234
237
- Workers scale automatically
235
238
236
-
### End-to-End Validation
237
-
Publish live streaming data.
239
+
### End-to-end validation
240
+
241
+
Publish live streaming data:
238
242
239
243
```console
240
244
gcloud pubsub topics publish logs-topic \
@@ -276,4 +280,8 @@ This confirms:
276
280
- ClickHouse ingests data on Axion (Arm64) via HTTP
277
281
- The end-to-end real-time pipeline is operational
278
282
279
-
This pipeline serves as the foundation for ClickHouse latency benchmarking and real-time analytics on Google Axion.
283
+
## What you've accomplished and what's next
284
+
285
+
You've successfully built a complete streaming ETL pipeline connecting Google Cloud Pub/Sub to ClickHouse running on an Arm-based Axion VM. The pipeline processes real-time events through Dataflow and stores them in ClickHouse for analytics.
286
+
287
+
This pipeline serves as the foundation for ClickHouse latency benchmarking and real-time analytics on Google Axion, which you'll perform in the next section.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/clickhouse-gcp/gcp_firewall_setup.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,19 +20,19 @@ To expose the TCP port 8123, create a firewall rule.
20
20
21
21
Navigate to the [Google Cloud Console](https://console.cloud.google.com/), go to **VPC Network > Firewall**, and select **Create firewall rule**.
22
22
23
-

23
+

24
24
25
25
Set the **Name** of the new rule to "allow-tcp-8123". Select your network that you intend to bind to your VM (default is "autoscaling-net", but your organization might have others).
26
26
27
27
28
-

28
+

29
29
30
30
Next, Set **Direction of traffic** to "Ingress". Set **Allow on match** to "Allow" and **Targets** to "Specified target tags". Set **Source IPv4 ranges** to "0.0.0.0/0".
31
31
32
-

32
+

33
33
34
34
Finally, select **Specified protocols and ports** under the **Protocols and ports** section. Select the **TCP** checkbox, enter "8123" in the **Ports** text field, and select **Create**.
35
35
36
-

36
+

37
37
38
38
The network firewall rule is now created, and you can continue with the VM creation.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/clickhouse-gcp/instance.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,20 +24,20 @@ To create a virtual machine based on the C4A instance type:
24
24
- Set **Series** to `C4A`.
25
25
- Select `c4a-standard-4` for machine type.
26
26
27
-

27
+

28
28
29
29
30
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**.
31
+
- If using **SUSE Linux Enterprise Server**, select "Pay As You Go" for the license type.
32
+
- Once appropriately selected and configured, click**Select**.
33
33
- Under **Networking**, enable **Allow HTTP traffic**.
34
34
- Click **Create** to launch the instance.
35
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
36
37
-

37
+

38
38
39
39
- A window from your browser should come up and you should now see a shell into your VM instance:
40
40
41
-

41
+

0 commit comments