Skip to content
Open
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,60 @@
---
title: Deploy Cassandra on Google Cloud C4A (Arm-based Axion VMs)

minutes_to_complete: 30

who_is_this_for: This is an introductory topic for software developers migrating Cassandra workloads from x86_64 to Arm-based servers, specifically on Google Cloud C4A virtual machines built on Axion processors.


learning_objectives:
- Provision an Arm-based SUSE SLES virtual machine on Google Cloud (C4A with Axion processors)
- Install and configure Apache Cassandra on a SUSE Arm64 (C4A) instance
- Validate Cassandra functionality using CQLSH and baseline keyspace/table operations
- Benchmark Cassandra performance using cassandra-stress for read and write workloads on Arm64 (Aarch64) architecture

prerequisites:
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled
- Familiarity with Cassandra architecture, replication, and [Cassandra partitioning & event-driven I/O](https://cassandra.apache.org/doc/stable/cassandra/architecture/)

author: Pareena Verma

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

armips:
- Neoverse

tools_software_languages:
- Apache Cassandra
- Java
- cqlsh
- cassandra-stress

operatingsystems:
- Linux

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

- resource:
title: Apache Cassandra documentation
link: https://cassandra.apache.org/doc/latest/
type: documentation

- resource:
title: Cassandra-stress documentation
link: https://cassandra.apache.org/doc/4.0/cassandra/tools/cassandra_stress.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: Getting started with Cassandra on Google Axion C4A (Arm Neoverse-V2)

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.

## Cassandra

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.

It provides high availability, fault tolerance, and linear scalability, making it ideal for real-time big data applications and high-throughput workloads.

Cassandra is widely used for time-series data, IoT applications, recommendation engines, and large-scale cloud services. Learn more from the [Cassandra official website](https://cassandra.apache.org/) and its [documentation](https://cassandra.apache.org/doc/latest/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
title: Apache Cassandra baseline testing on Google Axion C4A Arm Virtual machine
weight: 5

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


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.

## Baseline Testing for Apache Cassandra

This guide helps verify the installation and perform baseline testing of **Apache Cassandra**.

## Start Cassandra

Run Cassandra in the background:

```console
cassandra -R
```

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.

Check logs to ensure Cassandra started successfully:

```console
tail -f ~/cassandra/logs/system.log
```
Look for the message **"Startup complete"**, which indicates Cassandra is fully initialized.

### Check Cassandra Status
```console
nodetool status
```
You should see an output similar to:

```output
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 127.0.0.1 162.51 KiB 16 100.0% 78774686-39f3-47e7-87c3-3abc4f02a835 rack1
```
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.

### Connect with CQLSH (Cassandra Query Shell)
**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.

```console
cqlsh
```
You’ll enter the CQL (Cassandra Query Language) shell.

### Create a Keyspace (like a database)
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).

```sql
CREATE KEYSPACE testks WITH replication = {'class':'SimpleStrategy','replication_factor' : 1};
```
Check if created:

```sql
DESCRIBE KEYSPACES;
```

You should see an output similar to:

```output
cqlsh> DESCRIBE KEYSPACES;

system system_distributed system_traces system_virtual_schema
system_auth system_schema system_views testks
```

### Create a Table
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.

```sql
USE testks;

CREATE TABLE users (
id UUID PRIMARY KEY,
name text,
age int
);
```

### Insert Data
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.

```sql
INSERT INTO users (id, name, age) VALUES (uuid(), 'Alice', 30);
INSERT INTO users (id, name, age) VALUES (uuid(), 'Bob', 25);
```

### Query Data
This command retrieves all rows from the `users` table. Successful retrieval confirms that data insertion works correctly and that queries return expected results.

```sql
SELECT * FROM users;
```

You should see an output similar to:

```output
id | age | name
--------------------------------------+-----+-------
c08dafde-17f0-4a4a-82b8-54455bb07836 | 25 | Bob
d47eb93c-3988-4aa1-bc85-9561500a6893 | 30 | Alice

(2 rows)
```

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.
Loading