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,53 @@
---
title: Deploy Couchbase on Google Cloud C4A (Arm-based Axion VMs)

minutes_to_complete: 30

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

learning_objectives:
- Provision an Arm-based SUSE SLES virtual machine on Google Cloud (C4A with Axion processors)
- Install Couchbase Server on the SUSE Arm64 (C4A) instance
- Verify Couchbase deployment by accessing the Web Console, creating a test bucket, and confirming cluster health on Arm64
- Benchmark Couchbase by measuring operations per second (Ops/sec), memory utilization, and disk performance on the Arm64 platform

prerequisites:
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled
- Basic familiarity with [Couchbase](https://www.couchbase.com/)

author: Pareena Verma

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

armips:
- Neoverse

tools_software_languages:
- Couchbase
- cbc-pillowfight
- curl

operatingsystems:
- Linux

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

- resource:
title: Couchbase documentation
link: https://docs.couchbase.com/home/index.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,28 @@
---
title: Getting started with Couchbase 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.

## Couchbase

Couchbase is an open-source NoSQL distributed database designed for building high-performance, scalable, and flexible modern applications. Developed by Couchbase, Inc.
It combines the capabilities of a key-value store, document database, and distributed caching system in a single unified platform.

Couchbase provides a memory-first architecture for low-latency data access, along with a powerful query engine (N1QL) that supports SQL-like syntax for JSON data. It also features built-in replication, automatic sharding, and cross-datacenter synchronization (XDCR), enabling seamless scalability and high availability across clusters and regions.

It supports both on-premises and cloud deployments (including AWS, Azure, and GCP) and integrates with modern application stacks and container platforms like Kubernetes and Docker.

Known for its high throughput, low latency, and ease of scaling, Couchbase is ideal for use cases such as real-time analytics, session management, content delivery, IoT, and mobile synchronization through Couchbase Mobile.

To learn more, visit the official [Couchbase website](https://www.couchbase.com/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: Couchbase Baseline Testing on Google Axion C4A Arm Virtual Machine
weight: 5

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

## Couchbase Baseline Testing on GCP SUSE VMs
This section confirms that Couchbase is correctly installed and running on the GCP SUSE Arm64 VM. It includes checking required ports, initializing the cluster, verifying node status, and accessing the Web UI — ensuring the setup is ready for benchmarking.

### Check Required Ports
This command checks if those ports are open and active. If you see “LISTEN” next to these ports, it means Couchbase is ready to accept connections.

Couchbase uses the following ports for basic operation:

- Web Console: `8091`
- Query Service: `8093` (optional for N1QL queries)
- Data Service: `11210`

Check if the ports are listening:

```console
sudo ss -tuln | grep -E '8091|11210'
```

```output
tcp LISTEN 0 128 0.0.0.0:8091 0.0.0.0:*
tcp LISTEN 0 1024 0.0.0.0:11210 0.0.0.0:*
tcp LISTEN 0 1024 [::]:11210 [::]:*
```

### Initialize Couchbase Cluster
This step sets up Couchbase for the first time, essentially turning it on and configuring its basic settings.
- You’re giving it an admin username and password for login.
- The cluster name helps identify your setup.
- You’re enabling key services (data, index, query).
- You’re assigning memory so Couchbase knows how much RAM it can use.
If it says **“SUCCESS: Cluster initialized”**, Couchbase is ready to store and manage data.

```console
/opt/couchbase/bin/couchbase-cli cluster-init \
-c localhost:8091 \
--cluster-username Administrator \
--cluster-password password \
--cluster-name MyCluster \
--services data,index,query \
--cluster-ramsize 1024 \
--cluster-index-ramsize 512
```

You should see an output similar to:
```output
SUCCESS: Cluster initialized
```

### Verify Cluster Nodes
This command checks if your Couchbase server (called a “node”) is running properly.
If the output says **“healthy active”**, it means your Couchbase node is working fine and ready for operations.

```console
/opt/couchbase/bin/couchbase-cli server-list \
-u Administrator -p password \
--cluster localhost
```

```output
ns_1@cb.local 127.0.0.1:8091 healthy active
```

### Web UI Access
Ensure the Couchbase service is running and ports **8091 (Web UI)** and **11210 (Data)** are open.

```console
sudo systemctl start couchbase-server
sudo systemctl enable couchbase-server
sudo systemctl status couchbase-server
```
These commands make sure Couchbase is running and will automatically start after system reboots. After starting the service, open your web browser and visit your VM’s IP on port 8091.
Once the service is running, Couchbase is accessible in your browser at:

```cpp
http://<VM-IP>:8091
```
You will see the Couchbase Web Console — a dashboard where you can log in, manage data buckets, and monitor performance visually.

![Couchbase Dashboard alt-text#center](images/couchbase.png "Couchbase Web")

You can now proceed to the next section for benchmarking to measure Couchbase’s performance.
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
title: Couchbase Benchmarking
weight: 6

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


## Puppet Benchmark on GCP SUSE Arm64 VM
This section guides you through benchmarking Couchbase performance on a GCP SUSE Arm64 VM using the **official `cbc-pillowfight` tool** from Couchbase C SDK.
It involves installing dependencies, building the SDK, verifying the setup, and running the benchmark test.

### Install Build Tools & Dependencies
Before compiling the Couchbase SDK, install all required development tools and libraries.

```console
sudo zypper install -y gcc gcc-c++ cmake make git openssl-devel libevent-devel cyrus-sasl-devel
```

### Download and Build the Couchbase C SDK (includes cbc-pillowfight)
`cbc-pillowfight` is a Couchbase command-line benchmarking tool that simulates a workload by performing concurrent read and write operations on a bucket to test Couchbase cluster performance.

Clone the official Couchbase C SDK repository from GitHub. This SDK includes benchmarking tools such as `cbc` and `cbc-pillowfight`.

```console
cd ~
git clone https://github.com/couchbase/libcouchbase.git
cd libcouchbase
```

**Then build and install:**

```console
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
sudo make install
```

### Update the Dynamic Linker Configuration
After installation, tell the system where to find the Couchbase libraries.

```console
echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/libcouchbase.conf
```

Then refresh the linker cache to make the libraries available system-wide:

```console
sudo ldconfig
```

### Verify Installation
After installation, the tools like **cbc**, **cbc-pillowfight**, etc. should be available in `/usr/local/bin`.

**Verify with:**

```console
cbc version
cbc-pillowfight --help
```
You should see an output similar to:
```output
cbc:
Runtime: Version=3.3.18, Changeset=a8e17873d167ec75338a358e54cec3994612d260
Headers: Version=3.3.18, Changeset=a8e17873d167ec75338a358e54cec3994612d260
Build Timestamp: 2025-11-06 04:36:42
CMake Build Type: Release
Default plugin directory: /usr/local/lib64/libcouchbase
IO: Default=libevent, Current=libevent, Accessible=libevent,select
SSL Runtime: OpenSSL 1.1.1l-fips 24 Aug 2021 SUSE release 150500.17.40.1
SSL Headers: OpenSSL 1.1.1l-fips 24 Aug 2021 SUSE release SUSE_OPENSSL_RELEASE
HAVE_PKCS5_PBKDF2_HMAC: yes
Snappy: 1.1.8
Tracing: SUPPORTED
System: Linux-6.4.0-150600.23.73-default; aarch64
CC: GNU 7.5.0; -fno-strict-aliasing -ggdb3 -pthread
CXX: GNU 7.5.0; -fno-strict-aliasing -ggdb3 -pthread
```

### Run Benchmark using cbc-pillowfight
Once Couchbase Server is running and a bucket (e.g., `benchmark`) is created, you can run a workload test using the following command:

```console
cbc-pillowfight -U couchbase://127.0.0.1/benchmark \
-u Administrator -P password \
-I 10000 -B 1000 -t 5 -c 500
```

- **-U couchbase://127.0.0.1/benchmark**: Connection string to Couchbase bucket
- **-u Administrator**: Couchbase username
- **-P password**: Couchbase password
- **-I 10000**: Number of items (documents) to use
- **-B 1000**: Batch size for operations
- **-t 5**: Number of concurrent threads
- **-c 500**: Number of operation cycles to run

You should see an output similar to:
```output
Running. Press Ctrl-C to terminate...
Thread 0 has finished populating.
Thread 1 has finished populating.
Thread 2 has finished populating.
Thread 3 has finished populating.
Thread 4 has finished populating.
```

### Monitoring During Test
While the benchmark runs, open the Couchbase Web Console in your browser:

```bash
http://<your-vm-ip>:8091
```

**Navigate to**:
**Dashboard → Buckets → benchmark → Metrics tab**

Monitor real-time performance metrics such as:
- **Ops/sec** — should match your CLI output
- **Resident ratio** — how much data stays in memory
- **Disk write queue** — backlog of writes to disk
- **CPU and memory usage** — tells you how well ARM cores are handling load

![Couchbase Dashboard alt-text#center](images/arm-benchmark.png "Monitor Benchmark Log")

### Benchmark summary on x86_64
To compare the benchmark results, the following results were collected by running the same benchmark on a `x86 - c4-standard-4` (4 vCPUs, 15 GB Memory) x86_64 VM in GCP, running SUSE:

| **Name** | **Items** | **Resident** | **Ops/sec** | **RAM Used / Quota** | **Disk Used** |
|---------------|------------|---------------|---------------|-----------------------|---------------|
| benchmark | 10,000 | 100% | 219,961.9 | 36.9 MiB / 1 GiB | 25.3 MiB |

### Benchmark summary on Arm64
Results from the earlier run on the `c4a-standard-4` (4 vCPU, 16 GB memory) Arm64 VM in GCP (SUSE):

| **Name** | **Items** | **Resident** | **Ops/sec** | **RAM Used / Quota** | **Disk Used** |
|---------------|------------|---------------|---------------|-----------------------|---------------|
| benchmark | 10,000 | 100% | 227,981.1 | 36.8 MiB / 1 GiB | 26.7 MiB |

### Couchbase benchmarking comparison on Arm64 and x86_64

- **Operations per Second:** 227,981.1 ops/sec — indicates high throughput
- **Resident Ratio:** 100% — all data served directly from memory
- **RAM Usage:** 36.8 MiB used out of 1 GiB quota — highly efficient memory utilization
- **Disk Usage:** 26.7 MiB — minimal disk consumption
- **Overall:** The Couchbase bucket performed efficiently with strong in-memory performance and low resource usage.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading