diff --git a/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/_index.md b/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/_index.md index 5c3fe89ca4..65a5bf5a4f 100644 --- a/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/_index.md +++ b/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/_index.md @@ -1,6 +1,10 @@ --- title: Deploy Rust 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 Rust workloads on Linux/Arm64 environments, specifically using Google Cloud C4A virtual machines powered by Axion processors. diff --git a/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/baseline.md b/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/baseline.md index 8c43e5328f..31bbe747ae 100644 --- a/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/baseline.md +++ b/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/baseline.md @@ -17,6 +17,12 @@ rustc --version cargo --version ``` +You should see an output similar to: +```output +rustc 1.91.0 (f8297e351 2025-10-28) +cargo 1.91.0 (ea2d97820 2025-10-10) +``` + ### Create a Sample Rust Program Create and build a simple “Hello, World” application to ensure everything is functioning properly: diff --git a/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/benchmarking.md b/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/benchmarking.md index 9af710801a..978f28b73a 100644 --- a/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/benchmarking.md +++ b/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/benchmarking.md @@ -18,6 +18,12 @@ rustc --version cargo --version ``` +You should see an output similar to: +```output +rustc 1.91.0 (f8297e351 2025-10-28) +cargo 1.91.0 (ea2d97820 2025-10-10) +``` + ### Create a New Rust Project Create a new Rust project for benchmarking: @@ -26,7 +32,7 @@ cargo new rust-benchmark cd rust-benchmark ``` ### Add Criterion Benchmarking Dependency -**Criterion** is the officially recommended benchmarking crate for Rust. Add it to your project by editing the `Cargo.toml` file located inside your project root directory (for example, rust-benchmark/Cargo.toml): +**Criterion** is the officially recommended benchmarking crate for Rust. Add it to your project by editing the `Cargo.toml` file located inside your project root directory using your favorite editor (location example: rust-benchmark/Cargo.toml). Replace your "[dependencies]" tag within your file with this content, then save the file: ```toml [dependencies] @@ -39,11 +45,11 @@ harness = false This enables Criterion for high-precision benchmarking. ### Create the Benchmark File -Create a new benchmark file inside the `benches/` directory: +Create a new benchmark file inside the `benches/` directory using your favorite editor ("edit" used in the example below): ```console mkdir benches -vi benches/my_benchmark.rs +edit benches/my_benchmark.rs ``` Benchmark files in this directory are automatically detected by Cargo. @@ -96,22 +102,13 @@ Found 1 outliers among 100 measurements (1.00%) - **Plotting Backend:** Used `plotters` since Gnuplot was not found. - The results show **consistent performance** with only slight variation across 100 measurements. -### 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: - -| **Benchmark** | **Average Time (µs)** | **Min (µs)** | **Max (µs)** | **Outliers (%)** | **Remarks** | -|--------------------|----------------------:|--------------:|--------------:|-----------------:|----------------------------------| -| **fibonacci 20** | 19.152 | 19.100 | 19.205 | 6.00% | Minor outliers, stable overall. | - -### 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): | **Benchmark** | **Average Time (µs)** | **Min (µs)** | **Max (µs)** | **Outliers (%)** | **Remarks** | |--------------------|----------------------:|--------------:|--------------:|-----------------:|----------------------------------| | **fibonacci 20** | 12.028 | 12.026 | 12.030 | 1.00% | Very stable performance, minimal variation. | -### Rust benchmarking comparison on Arm64 and x86_64 - - The **Fibonacci (n=20)** benchmark demonstrated **consistent performance** with minimal deviation. - **Average execution time** was around **12.028 µs**, indicating efficient CPU computation on **Arm64**. - Only **1% outliers** were detected, showing **high stability** and **repeatability** of results. diff --git a/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/images/gcp-shell.png b/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/images/gcp-shell.png new file mode 100644 index 0000000000..7e2fc3d1b5 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/images/gcp-shell.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/images/gcp-ssh.png b/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/images/gcp-ssh.png new file mode 100644 index 0000000000..597ccd7fea Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/images/gcp-ssh.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/instance.md b/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/instance.md index 2b93bc950d..f531adfdd6 100644 --- a/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/instance.md +++ b/content/learning-paths/servers-and-cloud-computing/rust-on-gcp/instance.md @@ -26,6 +26,18 @@ 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**. - Click **Create** to launch the instance. +- Once created, you should see a "SSH" option to the right in your list of VM instances. Click on this to launch a SSH shell into your VM instance: + +![Invoke a SSH session via your browser alt-text#center](images/gcp-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 rust! \ No newline at end of file