Skip to content

Commit a85690a

Browse files
committed
Deploy Couchbase on Google Cloud C4A (Arm-based Axion VMs)
Signed-off-by: odidev <[email protected]>
1 parent a9ca570 commit a85690a

File tree

10 files changed

+447
-0
lines changed

10 files changed

+447
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: Deploy Couchbase 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 Couchbase workloads 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 Couchbase Server on the SUSE Arm64 (C4A) instance
11+
- Verify Couchbase deployment by accessing the Web Console, creating a test bucket, and confirming cluster health on Arm64
12+
- Benchmark Couchbase by measuring operations per second (Ops/sec), memory utilization, and disk performance on the Arm64 platform
13+
14+
prerequisites:
15+
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled
16+
- Basic familiarity with [Couchbase](https://www.couchbase.com/)
17+
18+
author: Pareena Verma
19+
20+
##### Tags
21+
skilllevels: Introductory
22+
subjects: Databases
23+
cloud_service_providers: Google Cloud
24+
25+
armips:
26+
- Neoverse
27+
28+
tools_software_languages:
29+
- Couchbase
30+
- cbc-pillowfight
31+
- curl
32+
33+
operatingsystems:
34+
- Linux
35+
36+
# ================================================================================
37+
# FIXED, DO NOT MODIFY
38+
# ================================================================================
39+
further_reading:
40+
- resource:
41+
title: Google Cloud documentation
42+
link: https://cloud.google.com/docs
43+
type: documentation
44+
45+
- resource:
46+
title: Couchbase documentation
47+
link: https://docs.couchbase.com/home/index.html
48+
type: documentation
49+
50+
weight: 1
51+
layout: "learningpathall"
52+
learning_path_main_page: "yes"
53+
---
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: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Getting started with Couchbase 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+
## Couchbase
18+
19+
Couchbase is an open-source NoSQL distributed database designed for building high-performance, scalable, and flexible modern applications. Developed by Couchbase, Inc.
20+
It combines the capabilities of a key-value store, document database, and distributed caching system in a single unified platform.
21+
22+
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.
23+
24+
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.
25+
26+
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.
27+
28+
To learn more, visit the official [Couchbase website](https://www.couchbase.com/)
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
title: Couchbase Baseline Testing on Google Axion C4A Arm Virtual Machine
3+
weight: 5
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Couchbase Baseline Testing on GCP SUSE VMs
10+
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.
11+
12+
### Check Required Ports
13+
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.
14+
15+
Couchbase uses the following ports for basic operation:
16+
17+
- Web Console: `8091`
18+
- Query Service: `8093` (optional for N1QL queries)
19+
- Data Service: `11210`
20+
21+
Check if the ports are listening:
22+
23+
```console
24+
sudo ss -tuln | grep -E '8091|11210'
25+
```
26+
27+
```output
28+
tcp LISTEN 0 128 0.0.0.0:8091 0.0.0.0:*
29+
tcp LISTEN 0 1024 0.0.0.0:11210 0.0.0.0:*
30+
tcp LISTEN 0 1024 [::]:11210 [::]:*
31+
```
32+
33+
### Initialize Couchbase Cluster
34+
This step sets up Couchbase for the first time, essentially turning it on and configuring its basic settings.
35+
- You’re giving it an admin username and password for login.
36+
- The cluster name helps identify your setup.
37+
- You’re enabling key services (data, index, query).
38+
- You’re assigning memory so Couchbase knows how much RAM it can use.
39+
If it says **“SUCCESS: Cluster initialized”**, Couchbase is ready to store and manage data.
40+
41+
```console
42+
/opt/couchbase/bin/couchbase-cli cluster-init \
43+
-c localhost:8091 \
44+
--cluster-username Administrator \
45+
--cluster-password password \
46+
--cluster-name MyCluster \
47+
--services data,index,query \
48+
--cluster-ramsize 1024 \
49+
--cluster-index-ramsize 512
50+
```
51+
52+
You should see an output similar to:
53+
```output
54+
SUCCESS: Cluster initialized
55+
```
56+
57+
### Verify Cluster Nodes
58+
This command checks if your Couchbase server (called a “node”) is running properly.
59+
If the output says **“healthy active”**, it means your Couchbase node is working fine and ready for operations.
60+
61+
```console
62+
/opt/couchbase/bin/couchbase-cli server-list \
63+
-u Administrator -p password \
64+
--cluster localhost
65+
```
66+
67+
```output
68+
[email protected] 127.0.0.1:8091 healthy active
69+
```
70+
71+
### Web UI Access
72+
Ensure the Couchbase service is running and ports **8091 (Web UI)** and **11210 (Data)** are open.
73+
74+
```console
75+
sudo systemctl start couchbase-server
76+
sudo systemctl enable couchbase-server
77+
sudo systemctl status couchbase-server
78+
```
79+
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.
80+
Once the service is running, Couchbase is accessible in your browser at:
81+
82+
```cpp
83+
http://<VM-IP>:8091
84+
```
85+
You will see the Couchbase Web Console — a dashboard where you can log in, manage data buckets, and monitor performance visually.
86+
87+
![Couchbase Dashboard alt-text#center](images/couchbase.png "Couchbase Web")
88+
89+
You can now proceed to the next section for benchmarking to measure Couchbase’s performance.
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
---
2+
title: Couchbase Benchmarking
3+
weight: 6
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
10+
## Puppet Benchmark on GCP SUSE Arm64 VM
11+
This section guides you through benchmarking Couchbase performance on a GCP SUSE Arm64 VM using the **official `cbc-pillowfight` tool** from Couchbase C SDK.
12+
It involves installing dependencies, building the SDK, verifying the setup, and running the benchmark test.
13+
14+
### Install Build Tools & Dependencies
15+
Before compiling the Couchbase SDK, install all required development tools and libraries.
16+
17+
```console
18+
sudo zypper install -y gcc gcc-c++ cmake make git openssl-devel libevent-devel cyrus-sasl-devel
19+
```
20+
21+
### Download and Build the Couchbase C SDK (includes cbc-pillowfight)
22+
`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.
23+
24+
Clone the official Couchbase C SDK repository from GitHub. This SDK includes benchmarking tools such as `cbc` and `cbc-pillowfight`.
25+
26+
```console
27+
cd ~
28+
git clone https://github.com/couchbase/libcouchbase.git
29+
cd libcouchbase
30+
```
31+
32+
**Then build and install:**
33+
34+
```console
35+
mkdir build && cd build
36+
cmake .. -DCMAKE_BUILD_TYPE=Release
37+
make -j$(nproc)
38+
sudo make install
39+
```
40+
41+
### Update the Dynamic Linker Configuration
42+
After installation, tell the system where to find the Couchbase libraries.
43+
44+
```console
45+
echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/libcouchbase.conf
46+
```
47+
48+
Then refresh the linker cache to make the libraries available system-wide:
49+
50+
```console
51+
sudo ldconfig
52+
```
53+
54+
### Verify Installation
55+
After installation, the tools like **cbc**, **cbc-pillowfight**, etc. should be available in `/usr/local/bin`.
56+
57+
**Verify with:**
58+
59+
```console
60+
cbc version
61+
cbc-pillowfight --help
62+
```
63+
You should see an output similar to:
64+
```output
65+
cbc:
66+
Runtime: Version=3.3.18, Changeset=a8e17873d167ec75338a358e54cec3994612d260
67+
Headers: Version=3.3.18, Changeset=a8e17873d167ec75338a358e54cec3994612d260
68+
Build Timestamp: 2025-11-06 04:36:42
69+
CMake Build Type: Release
70+
Default plugin directory: /usr/local/lib64/libcouchbase
71+
IO: Default=libevent, Current=libevent, Accessible=libevent,select
72+
SSL Runtime: OpenSSL 1.1.1l-fips 24 Aug 2021 SUSE release 150500.17.40.1
73+
SSL Headers: OpenSSL 1.1.1l-fips 24 Aug 2021 SUSE release SUSE_OPENSSL_RELEASE
74+
HAVE_PKCS5_PBKDF2_HMAC: yes
75+
Snappy: 1.1.8
76+
Tracing: SUPPORTED
77+
System: Linux-6.4.0-150600.23.73-default; aarch64
78+
CC: GNU 7.5.0; -fno-strict-aliasing -ggdb3 -pthread
79+
CXX: GNU 7.5.0; -fno-strict-aliasing -ggdb3 -pthread
80+
```
81+
82+
### Run Benchmark using cbc-pillowfight
83+
Once Couchbase Server is running and a bucket (e.g., `benchmark`) is created, you can run a workload test using the following command:
84+
85+
```console
86+
cbc-pillowfight -U couchbase://127.0.0.1/benchmark \
87+
-u Administrator -P password \
88+
-I 10000 -B 1000 -t 5 -c 500
89+
```
90+
91+
- **-U couchbase://127.0.0.1/benchmark**: Connection string to Couchbase bucket
92+
- **-u Administrator**: Couchbase username
93+
- **-P password**: Couchbase password
94+
- **-I 10000**: Number of items (documents) to use
95+
- **-B 1000**: Batch size for operations
96+
- **-t 5**: Number of concurrent threads
97+
- **-c 500**: Number of operation cycles to run
98+
99+
You should see an output similar to:
100+
```output
101+
Running. Press Ctrl-C to terminate...
102+
Thread 0 has finished populating.
103+
Thread 1 has finished populating.
104+
Thread 2 has finished populating.
105+
Thread 3 has finished populating.
106+
Thread 4 has finished populating.
107+
```
108+
109+
### Monitoring During Test
110+
While the benchmark runs, open the Couchbase Web Console in your browser:
111+
112+
```bash
113+
http://<your-vm-ip>:8091
114+
```
115+
116+
**Navigate to**:
117+
**Dashboard → Buckets → benchmark → Metrics tab**
118+
119+
Monitor real-time performance metrics such as:
120+
- **Ops/sec** — should match your CLI output
121+
- **Resident ratio** — how much data stays in memory
122+
- **Disk write queue** — backlog of writes to disk
123+
- **CPU and memory usage** — tells you how well ARM cores are handling load
124+
125+
![Couchbase Dashboard alt-text#center](images/arm-benchmark.png "Monitor Benchmark Log")
126+
127+
### Benchmark summary on x86_64
128+
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:
129+
130+
| **Name** | **Items** | **Resident** | **Ops/sec** | **RAM Used / Quota** | **Disk Used** |
131+
|---------------|------------|---------------|---------------|-----------------------|---------------|
132+
| benchmark | 10,000 | 100% | 219,961.9 | 36.9 MiB / 1 GiB | 25.3 MiB |
133+
134+
### Benchmark summary on Arm64
135+
Results from the earlier run on the `c4a-standard-4` (4 vCPU, 16 GB memory) Arm64 VM in GCP (SUSE):
136+
137+
| **Name** | **Items** | **Resident** | **Ops/sec** | **RAM Used / Quota** | **Disk Used** |
138+
|---------------|------------|---------------|---------------|-----------------------|---------------|
139+
| benchmark | 10,000 | 100% | 227,981.1 | 36.8 MiB / 1 GiB | 26.7 MiB |
140+
141+
### Couchbase benchmarking comparison on Arm64 and x86_64
142+
143+
- **Operations per Second:** 227,981.1 ops/sec — indicates high throughput
144+
- **Resident Ratio:** 100% — all data served directly from memory
145+
- **RAM Usage:** 36.8 MiB used out of 1 GiB quota — highly efficient memory utilization
146+
- **Disk Usage:** 26.7 MiB — minimal disk consumption
147+
- **Overall:** The Couchbase bucket performed efficiently with strong in-memory performance and low resource usage.
162 KB
Loading
88.2 KB
Loading
261 KB
Loading

0 commit comments

Comments
 (0)