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/cassandra-on-gcp/_index.md
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,5 @@
1
1
---
2
-
title: Deploy Cassandra on a Google Axion C4A virtual machine
3
-
4
-
draft: true
5
-
cascade:
6
-
draft: true
2
+
title: Deploy Cassandra on a Google Axion C4A virtual machine
7
3
8
4
minutes_to_complete: 30
9
5
@@ -18,7 +14,7 @@ learning_objectives:
18
14
19
15
prerequisites:
20
16
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled
21
-
- Familiarity with Cassandra architecture, replication, and [Cassandra partitioning & event-driven I/O](https://cassandra.apache.org/doc/stable/cassandra/architecture/)
17
+
- Familiarity with Cassandra architecture, replication, and [Cassandra partitioning and event-driven I/O](https://cassandra.apache.org/doc/stable/cassandra/architecture/)
title: Get started with Cassandra on Google Axion C4A
3
+
4
+
weight: 2
5
+
6
+
layout: "learningpathall"
7
+
---
8
+
9
+
## Explore Google Axion C4A Arm instances
10
+
11
+
Google Axion C4A is a family of Arm-based virtual machines built on Google's custom Axion CPU, based on Arm Neoverse-V2 cores. These virtual machines deliver 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 Arm architecture in Google Cloud.
14
+
15
+
To learn more about Google Axion, see the Google blog [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu).
16
+
17
+
## Explore Cassandra
18
+
19
+
Cassandra is a highly scalable, distributed NoSQL database designed to handle large amounts of data across many commodity servers without a single point of failure.
20
+
21
+
It provides high availability, fault tolerance, and linear scalability, making it ideal for real-time big data applications and high-throughput workloads.
22
+
23
+
Cassandra is widely used for time-series data, IoT applications, recommendation engines, and large-scale cloud services. To learn, see the [Cassandra website](https://cassandra.apache.org/) and the [Cassandra documentation](https://cassandra.apache.org/doc/latest/).
title: Apache Cassandra baseline testing on Google Axion C4A Arm Virtual machine
2
+
title: Test Cassandra baseline functionality
3
3
weight: 5
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
8
9
+
## Overview
9
10
10
-
Since Cassandra has been successfully installed on your GCP C4A Arm virtual machine, follow these steps to verify that it is running and functioning properly.
11
-
12
-
## Baseline Testing for Apache Cassandra
13
-
14
-
This guide helps verify the installation and perform baseline testing of **Apache Cassandra**.
11
+
Now that Cassandra is installed on your GCP C4A Arm virtual machine, verify that it's running and functioning properly.
15
12
16
13
## Start Cassandra
17
14
@@ -21,20 +18,23 @@ Run Cassandra in the background:
21
18
cassandra -R
22
19
```
23
20
24
-
The `-R` flag allows Cassandra to run in the background as a daemon, so you can continue using the terminal. The first startup may take **30–60 seconds** as it initializes the necessary files and processes.
21
+
The `-R` flag allows Cassandra to run in the background as a daemon. The first startup may take 30–60 seconds as it initializes.
25
22
26
23
Check logs to ensure Cassandra started successfully:
27
24
28
25
```console
29
26
tail -f ~/cassandra/logs/system.log
30
27
```
31
-
Look for the message **"Startup complete"**, which indicates Cassandra is fully initialized.
32
28
33
-
### Check Cassandra Status
29
+
Look for the message "Startup complete", which indicates Cassandra is fully initialized.
30
+
31
+
## Check Cassandra status
32
+
34
33
```console
35
34
nodetool status
36
35
```
37
-
You should see an output similar to:
36
+
37
+
The output is similar to:
38
38
39
39
```output
40
40
Datacenter: datacenter1
@@ -44,29 +44,34 @@ Status=Up/Down
44
44
-- Address Load Tokens Owns (effective) Host ID Rack
45
45
UN 127.0.0.1 162.51 KiB 16 100.0% 78774686-39f3-47e7-87c3-3abc4f02a835 rack1
46
46
```
47
-
The `nodetool status` command displays the health and status of your Cassandra node(s). For a single-node setup, the output should indicate that the node is **Up (U)** and **Normal (N)**. This confirms that your Cassandra instance is running and ready to accept queries.
48
47
49
-
### Connect with CQLSH (Cassandra Query Shell)
50
-
**cqlsh** is the interactive command-line shell for Cassandra. It allows you to run Cassandra Query Language (CQL) commands to interact with your database, create keyspaces and tables, insert data, and perform queries.
48
+
For a single-node setup, the output should indicate that the node is Up (U) and Normal (N), confirming that your Cassandra instance is running and ready to accept queries.
49
+
50
+
## Connect with CQLSH
51
+
52
+
`cqlsh` is the interactive command-line shell for Cassandra that allows you to run Cassandra Query Language (CQL) commands.
51
53
52
54
```console
53
55
cqlsh
54
56
```
55
-
You’ll enter the CQL (Cassandra Query Language) shell.
56
57
57
-
### Create a Keyspace (like a database)
58
-
A **keyspace** in Cassandra is similar to a database in SQL systems. Here, we create a simple keyspace `testks` with a **replication factor of 1**, meaning data will only be stored on one node (suitable for a single-node setup).
58
+
You'll enter the CQL (Cassandra Query Language) shell.
59
+
60
+
## Create a keyspace
61
+
62
+
A keyspace in Cassandra is similar to a database in SQL systems. Create a simple keyspace `testks` with a replication factor of 1 (suitable for a single-node setup):
59
63
60
64
```sql
61
65
CREATE KEYSPACE testks WITH replication = {'class':'SimpleStrategy','replication_factor' : 1};
62
66
```
63
-
Check if created:
67
+
68
+
Verify the keyspace was created:
64
69
65
70
```sql
66
71
DESCRIBE KEYSPACES;
67
72
```
68
73
69
-
You should see an output similar to:
74
+
The output is similar to:
70
75
71
76
```output
72
77
cqlsh> DESCRIBE KEYSPACES;
@@ -75,8 +80,9 @@ system system_distributed system_traces system_virtual_schema
75
80
system_auth system_schema system_views testks
76
81
```
77
82
78
-
### Create a Table
79
-
Tables in Cassandra are used to store structured data. This step creates a `users` table with three columns: `id` (unique identifier), `name` (text), and `age` (integer). The `id` column is the primary key.
83
+
## Create a table
84
+
85
+
Create a `users` table with three columns:
80
86
81
87
```sql
82
88
USE testks;
@@ -88,22 +94,24 @@ CREATE TABLE users (
88
94
);
89
95
```
90
96
91
-
### Insert Data
92
-
We insert two sample rows into the `users` table. The `uuid()` function generates a unique identifier for each row, which ensures that every user entry has a unique primary key.
97
+
## Insert data
98
+
99
+
Insert two sample rows into the `users` table. The `uuid()` function generates a unique identifier for each row:
93
100
94
101
```sql
95
102
INSERT INTO users (id, name, age) VALUES (uuid(), 'Alice', 30);
96
103
INSERT INTO users (id, name, age) VALUES (uuid(), 'Bob', 25);
97
104
```
98
105
99
-
### Query Data
100
-
This command retrieves all rows from the `users` table. Successful retrieval confirms that data insertion works correctly and that queries return expected results.
106
+
## Query data
107
+
108
+
Retrieve all rows from the `users` table:
101
109
102
110
```sql
103
111
SELECT*FROM users;
104
112
```
105
113
106
-
You should see an output similar to:
114
+
The output is similar to:
107
115
108
116
```output
109
117
id | age | name
@@ -114,6 +122,6 @@ You should see an output similar to:
114
122
(2 rows)
115
123
```
116
124
117
-
This baseline test verifies that Cassandra 5.0.5 is installed and running correctly on the VM. It confirms the node status, allows connection via `cqlsh`, and ensures basic operations like creating a keyspace, table, inserting, and querying data work as expected.
125
+
This baseline test verifies that Cassandra 5.0.5 is installed and running correctly on the VM, confirming node status, CQLSH connectivity, and basic database operations.
118
126
119
-
Please now press "Ctrl-D" to exit the Cassandra Query Shell.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/cassandra-on-gcp/benchmarking.md
+43-37Lines changed: 43 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,32 @@
1
1
---
2
-
title: Cassandra Benchmarking
2
+
title: Benchmark Cassandra performance
3
3
weight: 6
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Cassandra Benchmarking by Cassandra-Stress
10
-
Cassandra benchmarking can be performed using the built-in `cassandra-stress` tool, which helps measure database performance under different workloads such as write, read, and mixed operations.
9
+
## Benchmark Cassandra with cassandra-stress
11
10
12
-
### Steps for Cassandra Benchmarking with Cassandra-Stress
13
-
**Verify cassandra-stress Installation:**
11
+
You can perform Cassandra benchmarking using the built-in `cassandra-stress` tool, which measures database performance under different workloads such as write, read, and mixed operations.
14
12
15
-
Cassandra comes with a built-in tool called **cassandra-stress** that is used for testing performance. It is usually located in the `tools/bin/` folder of your Cassandra installation.
13
+
## Verify cassandra-stress installation
14
+
15
+
Cassandra comes with a built-in tool called `cassandra-stress` that is used for testing performance. It's located in the `tools/bin/` folder of your Cassandra installation.
16
16
17
17
```console
18
18
ls ~/cassandra/tools/bin | grep cassandra-stress
19
19
```
20
-
If you see cassandra-stress in the list, it means the tool is installed and ready to use.
21
20
22
-
**Run the version check:**
21
+
If you see `cassandra-stress` in the list, the tool is installed and ready to use.
23
22
24
-
To make sure the tool works correctly, check its help options.
23
+
Check the tool's help options to verify it works correctly:
25
24
26
25
```console
27
26
~/cassandra/tools/bin/cassandra-stress help
28
27
```
29
-
You should see output similar to the following:
28
+
29
+
The output is similar to:
30
30
31
31
```output
32
32
Usage: cassandra-stress <command> [options]
@@ -43,10 +43,10 @@ help : Print help for a command or option
43
43
print : Inspect the output of a distribution definition
44
44
version : Print the version of cassandra stress
45
45
```
46
-
If the tool is working, you will see a list of commands and options that you can use to run benchmarks.
47
-
This confirms that your setup is correct and you’re ready to start testing Cassandra’s performance.
48
46
49
-
### Basic Write Test
47
+
The list of commands and options confirms that your setup is correct and you're ready to start testing Cassandra's performance.
48
+
49
+
## Run a basic write test
50
50
Insert 10,000 rows with 50 concurrent threads using `cassandra-stress`:
51
51
52
52
```console
@@ -56,7 +56,7 @@ Insert 10,000 rows with 50 concurrent threads using `cassandra-stress`:
56
56
-**n=10000** → Specifies the number of rows to insert during the benchmark test.
57
57
-**-rate threads=50** → Sets the number of concurrent worker threads simulating multiple clients writing to the cluster.
@@ -186,13 +186,16 @@ Total operation time : 00:00:00
186
186
END
187
187
```
188
188
189
-
### Read Test
190
-
The following command runs a **read benchmark** on your Cassandra database using `cassandra-stress`. It simulates multiple clients reading from the cluster at the same time and records performance metrics such as **throughput** and **latency**.
189
+
## Run a read test
190
+
191
+
Run a read benchmark on your Cassandra database using `cassandra-stress`. This simulates multiple clients reading from the cluster at the same time and records performance metrics such as throughput and latency.
@@ -356,12 +362,12 @@ Results from the earlier run on the `c4a-standard-4` (4 vCPU, 16 GB memory) Arm6
356
362
| Total GC Time | 0.0 s | 0.0 s |
357
363
| Total Operation Time | 0:00:00 | 0:00:02 |
358
364
359
-
### Cassandra performance benchmarking notes
360
-
When examining the benchmark results, you will notice that on the Google Axion C4A Arm-based instances:
365
+
## What you've accomplished and what's next
366
+
367
+
You've successfully deployed Apache Cassandra 5.0.5 on a Google Axion C4A Arm-based virtual machine, validated its functionality, and measured its performance using cassandra-stress. The benchmark results on Google Axion C4A Arm-based instances demonstrate strong performance characteristics.
368
+
369
+
Write operations achieved high throughput of 10,690 op/s, while read operations reached 4,962 op/s on the `c4a-standard-4` Arm64 VM. Write latency was notably low with a mean of 3.7 ms compared to reads at 6.3 ms, indicating fast write processing on this Arm64 VM. The 95th and 99th percentile latencies show consistent performance, with writes significantly faster than reads. Zero errors or GC overhead confirm stable and reliable benchmarking results.
361
370
362
-
- The write operations achieved a high throughput of **10,690 op/s**, while read operations reached **4,962 op/s** on the `c4a-standard-4` Arm64 VM.
363
-
- Latency for writes was very low (mean: **3.7 ms**) compared to reads (mean: **6.3 ms**), indicating fast write processing on this Arm64 VM.
364
-
- The 95th and 99th percentile latencies show consistent performance, with writes significantly faster than reads.
365
-
- There were no errors or GC overhead, confirming stable and reliable benchmarking results.
371
+
The Arm64 VM provides efficient and predictable performance, making it suitable for high-throughput Cassandra workloads. The low write latencies and high operation rates demonstrate that Arm-based infrastructure can effectively handle database operations that require both speed and consistency. These results provide a solid baseline for evaluating Cassandra performance on Arm64 architecture and can guide decisions about instance sizing and configuration for production deployments.
366
372
367
-
Overall, the Arm64 VM provides efficient and predictable performance, making it suitable for high-throughput Cassandra workloads.
373
+
To continue building on this foundation, you can explore advanced Cassandra configurations such as multi-node cluster deployments, replication strategies for high availability, or performance tuning for specific workload patterns. You might also investigate integrating Cassandra with application frameworks or comparing performance across different Arm-based instance types to optimize for your use case.
0 commit comments