Skip to content
Merged
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
@@ -1,6 +1,10 @@
---
title: Deploy Couchbase on Google Cloud C4A (Arm-based Axion VMs)

draft: true
cascade:
draft: true

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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,89 +1,90 @@
---
title: Couchbase Baseline Testing on Google Axion C4A Arm Virtual Machine
weight: 5
weight: 6

### 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.
This section confirms that Couchbase is correctly installed and running on the GCP SUSE Arm64 VM. It includes initializing the cluster, verifying node status, and accessing the Web UI to create a bucket — this ensures 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.
### Setup the default cluster
Once the service is running, we need to setup the default cluster for the first time.

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:
- Open Web Console using your VM public IP address that you saved off in the last step:

```console
sudo ss -tuln | grep -E '8091|11210'
http://<VM-Public-IP>:8091
```
- Press "Setup New Cluster"

```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 [::]:*
```
![Setup new cluster](images/cluster-setup-1.png "Setup new cluster")

### 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.
- Provide a name for your cluster (example: "my_cluster") and create a password for your administrator account (leave the username as the default "Administrator")

```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
```
![Create cluster and admin count](images/cluster-setup-2.png "Create cluster and admin count")

You should see an output similar to:
```output
SUCCESS: Cluster initialized
```
- Check the "Accept terms" checkbox and press "Configure Disk, Memory, Services" button

![Accept Terms](images/cluster-setup-3.png "Accept Terms")

- Accept the defaults of your cluster configuration and press "Save & Finish"

![Finalize configuration](images/cluster-setup-4.png "Finalize configuration")

Our default cluster is now created! Please retain the passord you created for your "Administrator" account... you'll need that in the next steps.

### Verify Cluster Nodes
This command checks if your Couchbase server (called a “node”) is running properly.
This command checks if your Couchbase server (called a “node”) is running properly. Replace "password" with your specified Couchbase Administrator password.
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
-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.
### Prepare a Couchbase Bucket for benchmarking
Once the service is running, you can access the **Couchbase Web Console** to create a bucket for benchmarking.

Open Web Console using the public IP address of your VM that you saved off from the last step:

```console
sudo systemctl start couchbase-server
sudo systemctl enable couchbase-server
sudo systemctl status couchbase-server
http://<VM-Public-IP>:8091
```
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:
Use the admin `username` (default is "Administrator") and `password` you created during Couchbase cluster setup in the previous step.

```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](images/dashboard-1.png "Couchbase Dashboard")

- On the left hand side select "Buckets"
- Press the "Add Bucket" in the upper right hand corner:

![Create Bucket](images/create-bucket-1.png "Create Bucket")

- Name the new bucket "benchmark"
- The bucket type will be "Couchbase"
- The Memory Quota can be set to "512 MB"

![Create Bucket](images/create-bucket-2.png "Create Bucket")

| **Parameter** | **Value** |
|----------------|-----------|
| **Bucket Name** | benchmark |
| **Bucket Type** | Couchbase |
| **Memory Quota** | 512 MB |

- You should now see that your bucket has been created:

![Created Bucket](images/create-bucket-3.png "Created Bucket")

#### Additional notes about buckets in Couchbase

![Couchbase Dashboard alt-text#center](images/couchbase.png "Couchbase Web")
- A **bucket** in Couchbase is like a **database** — it stores and manages your data.
- The **benchmark** bucket will be used for **load testing** and **performance benchmarking**.
- Setting the **RAM Quota** ensures Couchbase allocates sufficient memory for **in-memory data operations**, improving overall speed.

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
@@ -1,21 +1,21 @@
---
title: Couchbase Benchmarking
weight: 6
weight: 7

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


## Puppet Benchmark on GCP SUSE Arm64 VM
## Couchbase 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
sudo zypper install -y gcc gcc-c++ cmake make git openssl-devel libevent-devel cyrus-sasl-devel java
```

### Download and Build the Couchbase C SDK (includes cbc-pillowfight)
Expand Down Expand Up @@ -60,7 +60,7 @@ After installation, the tools like **cbc**, **cbc-pillowfight**, etc. should be
cbc version
cbc-pillowfight --help
```
You should see an output similar to:
For the "cbc version" command, you should see an output similar to:
```output
cbc:
Runtime: Version=3.3.18, Changeset=a8e17873d167ec75338a358e54cec3994612d260
Expand All @@ -79,18 +79,19 @@ cbc:
CXX: GNU 7.5.0; -fno-strict-aliasing -ggdb3 -pthread
```

For the "cbc-pillowfight --help" command, you should see the "help" menu displayed for cbc-pillowfight.

### 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:
Once Couchbase Server is running and a bucket (e.g., `benchmark`) is created, you can run a workload test using the following command (use your Couchbase administrators password):

```console
cbc-pillowfight -U couchbase://127.0.0.1/benchmark \
-u Administrator -P password \
-I 10000 -B 1000 -t 5 -c 500
-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
- **-u Administrator**: Couchbase admin username (default: "Administrator")
- **-P password**: Couchbase Administrator's password
- **-I 10000**: Number of items (documents) to use
- **-B 1000**: Batch size for operations
- **-t 5**: Number of concurrent threads
Expand All @@ -114,7 +115,7 @@ http://<your-vm-ip>:8091
```

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

Monitor real-time performance metrics such as:
- **Ops/sec** — should match your CLI output
Expand All @@ -124,22 +125,13 @@ Monitor real-time performance metrics such as:

![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
### Benchmark summary
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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Create a Firewall Rule on GCP
weight: 3

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

## Overview

In this section, you will learn how to create a Firewall Rule within Google Cloud Console. For this learning path, we need to expose TCP port 8091.

{{% notice Note %}}
For support on GCP setup, see the Learning Path [Getting started with Google Cloud Platform](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/google/).
{{% /notice %}}

## Create a Firewall Rule in GCP

For this learning path, we need to expose TCP port 8091. To accomplish this, we first need to create a firewall rule.
- Navigate to the [Google Cloud Console](https://console.cloud.google.com/).
- Go to **VPC Network > Firewall** and press **Create firewall rule**.

![Create a firewall rule](images/firewall-rule.png "Create a firewall rule")

- Next, we create the firewall rule that will expose TCP port 8091 for our learning path.
- Set the "Name" of the new rule to "allow-tcp-8091"
- Select your network that you intend to bind to your VM (default is "autoscaling-net" but your organization might have others that you need to use)
- Direction of traffic should be set to "Ingress"
- Allow on match should be set to "Allow" and the "Targets" should be set to "Specified target tags".
- Enter "allow-tcp-8091" to the "Target tags" text field
- Set the "Source IPv4 ranges" text value to "0.0.0.0/0"

![Create a firewall rule](images/network-rule.png "Creating the TCP/8091 firewall rule")

- Lastly, we select "Specified protocols and ports" under the "Protocols and ports" section
- Select the "TCP" checkbox
- Enter "8091" in the "Ports" text field
- Press "Create"

![Specifying the TCP port to expose](images/network-port.png "Specifying the TCP port to expose")

Our network firewall rule is now created so we can continue with the VM creation!
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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
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
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Install Couchbase
weight: 4
weight: 5

### FIXED, DO NOT MODIFY
layout: learningpathall
Expand Down Expand Up @@ -65,27 +65,30 @@ sudo systemctl enable couchbase-server
sudo systemctl status couchbase-server
```

### Prepare Couchbase Bucket
Once the service is running, you can access the **Couchbase Web Console** to create a bucket for baseline and benchmarking.
You should see the following snippet as part of your output:
```output
Active: active(running) since YYY XXXX-XX-XX
```

Open Web Console:
### 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.

```console
http://<VM-IP>:8091
```
Use the admin `username` and `password` you created during Couchbase setup.
Couchbase uses the following ports for basic operation:

Create a bucket named `benchmark`:
- Web Console: `8091`
- Query Service: `8093` (optional for N1QL queries)
- Data Service: `11210`

| **Parameter** | **Value** |
|----------------|-----------|
| **Bucket Name** | benchmark |
| **Bucket Type** | Couchbase |
| **RAM Quota** | 512 MB (or as per VM size) |
| **Password** | Choose a secure password (e.g., `mypassword`) |
Check if the ports are listening:

- A **bucket** in Couchbase is like a **database** — it stores and manages your data.
- The **benchmark** bucket will be used for **load testing** and **performance benchmarking**.
- Setting the **RAM Quota** ensures Couchbase allocates sufficient memory for **in-memory data operations**, improving overall speed.
```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 [::]:*
```

Once the **installation and setup are complete**, you can now proceed to the **baseline testing** phase.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Create a Google Axion C4A Arm virtual machine on GCP
weight: 3
weight: 4

### FIXED, DO NOT MODIFY
layout: learningpathall
Expand All @@ -26,6 +26,24 @@ To create a virtual machine based on the C4A instance type:

![Create a Google Axion C4A Arm virtual machine in the Google Cloud Console with c4a-standard-4 selected alt-text#center](images/gcp-vm.png "Creating a Google Axion C4A Arm virtual machine in Google Cloud Console")

- Under **OS and Storage**, select **Change**, then choose an Arm64-based OS image. For this Learning Path, use **SUSE Linux Enterprise Server**. Pick the preferred version for your Operating System. Ensure you select the **Arm image** variant. Click **Select**.

- Under **OS and Storage**, select **Change**, then choose an Arm64-based OS image. For this Learning Path, use **SUSE Linux Enterprise Server**.
- If using use **SUSE Linux Enterprise Server**. Select "Pay As You Go" for the license type.
- Once appropriately selected, please Click **Select**.
- Under **Networking**, enable **Allow HTTP traffic**.
- Also under **Networking**, in the "Network tags" text field add "allow-tcp-8091" as an additional tag

![Adding the TCP/8091 firewall rule to our VM](images/network-config.png "Adding the TCP/8091 firewall rule to our VM")

- Click **Create** to launch the instance.
- Once created, you should see a "SSH" option to the right in your list of VM instances. You should also see the public IP address for your VM.
- Save off the public IP address for your VM as you will need this in the next step.
- Click on this to launch a SSH shell into your VM instance:

![Invoke a SSH session via your browser alt-text#center](images/gcp-pubip-ssh.png "Invoke a SSH session into your running VM instance")

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

![Terminal Shell in your VM instance alt-text#center](images/gcp-shell.png "Terminal shell in your VM instance")

Next, let's install Couchbase!