diff --git a/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/_index.md b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/_index.md new file mode 100644 index 000000000..256137b39 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/_index.md @@ -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" +--- diff --git a/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/_next-steps.md b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/_next-steps.md new file mode 100644 index 000000000..c3db0de5a --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/_next-steps.md @@ -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. +--- diff --git a/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/background.md b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/background.md new file mode 100644 index 000000000..2fb616d64 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/background.md @@ -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/) diff --git a/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/baseline.md b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/baseline.md new file mode 100644 index 000000000..db8dc651e --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/baseline.md @@ -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://: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. diff --git a/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/benchmarking.md b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/benchmarking.md new file mode 100644 index 000000000..4163d7fd6 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/benchmarking.md @@ -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://: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. diff --git a/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/images/arm-benchmark.png b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/images/arm-benchmark.png new file mode 100644 index 000000000..c873e5e30 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/images/arm-benchmark.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/images/couchbase.png b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/images/couchbase.png new file mode 100644 index 000000000..7fa90539a Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/images/couchbase.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/images/gcp-vm.png b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/images/gcp-vm.png new file mode 100644 index 000000000..0d1072e20 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/images/gcp-vm.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/installation.md b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/installation.md new file mode 100644 index 000000000..50187a814 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/installation.md @@ -0,0 +1,91 @@ +--- +title: Install Couchbase +weight: 4 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Install Couchbase on GCP VM +This section explains how to install and configure **Couchbase Server** on a GCP Linux VM (SUSE or RHEL-based). +Follow the steps below carefully to ensure a successful setup. + +### System Preparation +Before installing Couchbase, update the system and install the required tools. + +```console +sudo zypper refresh +sudo zypper update -y +sudo zypper install -y curl wget net-tools lsb-release +``` +### Download Couchbase Server +Download the Couchbase Server package for ARM64 architecture. + +```console +cd ~ +wget -O couchbase-server-8.0.0-linux.aarch64.rpm \ +https://packages.couchbase.com/releases/8.0.0/couchbase-server-community-8.0.0-linux.aarch64.rpm +``` +**Verify the downloaded file:** +After downloading, verify that the file exists and check its size. + +```console +ls -lh couchbase-server-8.0.0-linux.aarch64.rpm +``` +This helps confirm the file was downloaded correctly and not truncated or corrupted. + +### Install Couchbase Server +Install the downloaded Couchbase RPM package. + +```console +sudo rpm -ivh couchbase-server-8.0.0-linux.aarch64.rpm +``` +- **rpm -ivh** → Installs the RPM package, displaying verbose output and progress (v for verbose, h for hash marks). +- This command installs Couchbase and sets up the necessary directories, binaries, and services. + +**Confirm that Couchbase has been installed successfully:** + +```console +rpm -qa | grep couchbase +``` +You should see an output similar to: +```output +couchbase-server-community-8.0.0-3777.aarch64 +``` +### Start Couchbase Service +Start and enable the Couchbase service so that it runs automatically on startup. + +```console +sudo systemctl start couchbase-server +sudo systemctl enable couchbase-server +``` + +**Verify service status:** +```console +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. + +Open Web Console: + +```console +http://:8091 +``` +Use the admin `username` and `password` you created during Couchbase setup. + +Create a bucket named `benchmark`: + +| **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`) | + +- 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. + +Once the **installation and setup are complete**, you can now proceed to the **baseline testing** phase. diff --git a/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/instance.md b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/instance.md new file mode 100644 index 000000000..2b93bc950 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/couchbase-on-gcp/instance.md @@ -0,0 +1,31 @@ +--- +title: Create a Google Axion C4A Arm virtual machine on GCP +weight: 3 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Overview + +In this section, you will learn how to provision a Google Axion C4A Arm virtual machine on Google Cloud Platform (GCP) using the `c4a-standard-4` (4 vCPUs, 16 GB memory) machine type in the Google Cloud Console. + +{{% 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 %}} + +## Provision a Google Axion C4A Arm VM in Google Cloud Console + +To create a virtual machine based on the C4A instance type: +- Navigate to the [Google Cloud Console](https://console.cloud.google.com/). +- Go to **Compute Engine > VM Instances** and select **Create Instance**. +- Under **Machine configuration**: + - Populate fields such as **Instance name**, **Region**, and **Zone**. + - Set **Series** to `C4A`. + - Select `c4a-standard-4` for machine 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 **Networking**, enable **Allow HTTP traffic**. +- Click **Create** to launch the instance.