Create an HPC-ready VM instance

Tightly coupled high performance computing (HPC) workloads often use the Message Passing Interface (MPI) to communicate between processes and Compute Engine instances. But building your own OS image that is tuned for optimal MPI performance requires systems expertise, Cloud de Confiance by S3NS knowledge, and extra time for maintenance. To quickly set up an optimized environment for your HPC workloads, use an HPC VM image.

An HPC VM image is based on Rocky Linux 8 or Rocky Linux 9, and is optimized for tightly coupled HPC workloads. It includes pre-configured kernel and network tuning parameters required to create compute instances that achieve optimal MPI performance on Cloud de Confiance by S3NS.

For best results, deploy the HPC VM image on a machine type from the compute-optimized machine series. These machine types are designed for tightly-coupled HPC applications. To use Cloud RDMA with H4D, you must use version 20250917 or later of the HPC VM Rocky 8 image.

You can create an HPC VM instance by using any of the methods available to create a compute instance. You can also use SchedMD's Slurm workload manager, to deploy a HPC cluster. Slurm support isn't yet available for HPC VM images based on Rocky Linux 9.

Before you begin

  • If you haven't already, set up authentication. Authentication verifies your identity for access to Cloud de Confiance by S3NS services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:

    Select the tab for how you plan to use the samples on this page:

    Console

    When you use the Cloud de Confiance console to access Cloud de Confiance by S3NS services and APIs, you don't need to set up authentication.

    gcloud

    1. Install the Google Cloud CLI, and then sign in to the gcloud CLI with your federated identity. After signing in, initialize the Google Cloud CLI by running the following command:

      gcloud init
    2. Set a default region and zone.

Benefits

The HPC VM image provides the following benefits:

  1. Compute instances ready for HPC workloads out-of-the-box. There is no need to manually tune performance, manage compute instance reboots, or stay up to date with the latest Cloud de Confiance updates for tightly-coupled HPC workloads.
  2. Networking optimizations for tightly-coupled workloads. Optimizations that reduce latency for small messages are included, which benefits applications that are heavily dependent on point-to-point and collective communications. If using the H4D machine series, the HPC VM Rocky 8 image contains the necessary Cloud RDMA drivers.
  3. Compute optimizations for HPC workloads. Optimizations that reduce system jitter are included, which makes single-node high performance more predictable.
  4. Consistent, reproducible performance. OS image standardization gives you consistent, reproducible application-level performance.
  5. Improved application compatibility. Alignment with the node-level requirements of the Intel HPC platform specification enables a high degree of interoperability between systems.

HPC VM image features

The HPC VM image offers several features that are designed to optimize performance for high performance computing (HPC) workloads:

  • Automatic updates disabled
  • MPI collective tunings
  • Pre-installed RPMs

Automatic updates disabled

Automatic updates can have a negative impact on the performance of HPC workloads. Automatic updates can be disabled when using HPC VM images by setting the google_disable_automatic_updates metadata entry to TRUE when creating a compute instance. How this metadata entry is set during instance creation depends on the tool that you use to create the instance.

For example, when using the gcloud compute instances create command to create a compute instance, provide the --metadata argument. For more information, see About VM metadata.

The google_disable_automatic_updates metadata entry is available as follows:

  • HPC VM Rocky 9 images: all versions.
  • HPC VM Rocky 8 images: only in images built on or after July 12, 2024. The build date (formatted as YYYYMMDD) is used as the version number at the end of image names. For example, an HPC VM Rocky 8 image built on the 21st of July, 2025 has the name hpc-rocky-linux-8-v20250721.

If you disable automatic updates on your H4D instances, then you should regularly run the dnf update command on the instance to keep the Cloud RDMA driver up to date.

Intel MPI Library

Google recommends that you use the google_install_intelmpi script to install the message passing interface (MPI) library before running MPI jobs on Cloud de Confiance by S3NS. For more information, see Use Intel MPI 2021.

Pre-installed RPMs

The HPC VM image comes with the following RPM packages pre-installed:

  • daos-client
  • gcc-gfortran
  • gcc-toolset-12
  • Lmod
  • dkms
  • htop
  • hwloc
  • hwloc-devel
  • infiniband-diags
  • kernel-devel
  • kmod-idpf-irdma
  • libfabric
  • librdmacm-utils
  • libibverbs-utils
  • libXt
  • ltrace
  • nfs-utils
  • numactl
  • numactl-devel
  • papi
  • pciutils
  • pdsh
  • perf
  • perftest
  • rdma-core
  • redhat-lsb-core (HPC VM Rocky 8 only)
  • redhat-lsb-cxx (HPC VM Rocky 8 only)
  • rsh
  • screen
  • strace
  • wget
  • zsh
  • "Development Tools" package group

Quickstarts

These tutorials describe the steps to set up an HPC-optimized VM instance. The procedures describe how to:

  • Create an HPC VM instance (without configuring Cloud RDMA)
  • Specify a compact placement policy when creating HPC VM instances
  • Create an HPC VM instance that uses Cloud RDMA

You can't add Cloud RDMA to an existing HPC VM instance, so follow the appropriate steps when creating your instance.

Before you begin

  1. To use the Google Cloud CLI for this quickstart, you must first install and initialize the Google Cloud CLI:
  2. In the Cloud de Confiance console, on the project selector page, select or create a Cloud de Confiance project.

Create an HPC VM instance

We strongly recommend using the HPC VM image with your HPC workloads using the following machine series:

Machine series HPC VM Rocky Linux 8 HPC VM Rocky Linux 9
H4D Yes No
H3 Yes Yes
C2D Yes Yes
C2 Yes Yes

The machine types in these series have fixed virtual-to-physical core mappings and expose NUMA cell architecture to the guest OS, both of which are critical for performance of tightly-coupled HPC applications.

If you are creating multiple, interconnected HPC VM instances, then follow the instructions at create HPC VM instances with compact placement policies to achieve low network latency.

Console

  1. In the Cloud de Confiance console, go to the Create an instance page.

    Go to Create an instance

    If prompted, select your project and click Continue. The Create an instance page appears and displays the Machine configuration pane.

  2. In the Machine configuration pane, do the following:

    1. In the Name field, specify a name for your compute instance. For more information, see Resource naming convention.
    2. Optional: Select a Region and Zone for the instance.

      The default selection for Zone is Any. If you don't change this default selection, then Google automatically chooses a zone for you based on machine type and availability.

    3. Click the Compute-optimized tab. The Cloud de Confiance console then displays the machine series that are available for your selected machine family.

    4. In the Series column, select the machine series for your VM, for example C2.

    5. In the Machine type section, select the machine type for your VM, for example, c2-standard-60.

  3. In the navigation menu (on the left side), click OS and storage. In

  4. In the Operating system and storage pane, configure your boot disk by doing the following:

    1. Click Change. The Boot disk pane appears and displays the Public images tab.
    2. In the Operating system list, select HPC VM Image.
    3. In the Version list, select the OS version.
    4. Optional: In the Boot disk type list, select the type of the boot disk.
    5. Optional: In the Size (GB) field, specify the size of the boot disk.
    6. Optional: For Hyperdisk Balanced boot disks, specify values for the Provisioned IOPS and Provisioned throughput fields.
    7. Optional: For advanced configuration options, expand the Show advanced configurations section.
    8. To confirm your boot disk options and return to the Operating system and storage pane, click Select.
  5. In the navigation menu, click Networking. In the Networking pane that appears, do the following:

    1. Go to the Firewall section.
    2. To permit HTTP or HTTPS traffic to the VM, select Allow HTTP traffic or Allow HTTPS traffic.

      The Compute Engine adds a network tag to your VM and creates the corresponding ingress firewall rule that allows all incoming traffic on tcp:80 (HTTP) or tcp:443 (HTTPS). The network tag associates the firewall rule with the VM. For more information, see Firewall rules overview in the Cloud Next Generation Firewall documentation.

  6. Optional: If you chose an OS image that supports Shielded VM features, you can modify the Shielded VM settings.

    To do so, in the navigation menu, Click Security. In the Security pane that appears, you can configure the following:

  7. Optional: Specify other configuration options. For more information, see Configuration options during instance creation.

  8. Optional: To create the compute instance using reserved resources, in the navigation menu, click Advanced. In the Reservations section, select Use automatic selection. To consume the reservation, make sure the compute instance properties match the properties specified in the reservation.

  9. To create and start the HPC VM instance, click Create.

gcloud

Create an HPC VM instance by using the instances create command.

To create an HPC VM instance without a placement policy, use a command similar to the following:

gcloud compute instances create INSTANCE_NAME \
        --zone=ZONE \
        --image-family=IMAGE_FAMILY \
        --image-project=cloud-hpc-image-public \
        --maintenance-policy=TERMINATE \
        --machine-type=MACHINE_TYPE

Replace the following:

  • INSTANCE_NAME: a name for the HPC VM instance.
  • ZONE: the zone to create the instance in.
  • IMAGE_FAMILY: The image family of the image to use when creating the VM instances. Use hpc-rocky-linux-8 for the latest image version based on Rocky Linux 8, or hpc-rocky-linux-9 for the latest image version based on Rocky Linux 9.
  • MACHINE_TYPE: the machine type to use when creating the VM instance.

After some time, the VM instance creation completes. To verify the instance configuration and to see its status, run the following command:

gcloud compute instances describe INSTANCE_NAME

REST

Use the instances.insert method to create a compute instance that uses an HPC VM OS image:

POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances

{
   "machineType":"zones/ZONE/machineTypes/MACHINE_TYPE",
   "name":"VM_NAME",
   "disks":[
      {
         "initializeParams":{
            "sourceImage":"projects/cloud-hpc-image-public/global/images/IMAGE"
         },
         "boot":true
      }
   ],
   "networkInterfaces":[
      {
         "network":"global/networks/NETWORK_NAME"
      }
   ]
}

Replace the following:

  • PROJECT_ID: ID of the project to create the compute instance in
  • ZONE: zone to create the compute instance in
  • MACHINE_TYPE: machine type, predefined or custom, for the new compute instance
  • INSTANCE_NAME: name of the new compute instance
  • IMAGE: specify one of the following:
    • IMAGE: a specific version of a HPC VM image, for example hpc-rocky-linux-9-v20260326
    • IMAGE_FAMILY: the image family, which is either hpc-rocky-linux-9 or hpc-rocky-linux-8. Using this method creates the compute instance using the most recent, non-deprecated HPC VM image in the specified family.
  • NETWORK_NAME: the VPC network that you want to use for the compute instance. You can specify default to use your default network.

Create HPC VM instances with compact placement policies

You can reduce the latency between compute instances by creating a compact placement policy. A compact placement policy ensures that instances in the same availability zone are located close to each other.

If you need more compute instances than can fit in a single compact placement policy, then divide your instances into multiple placement policies. Use the minimum number of placement policies that can fit all your instances.

To create HPC VM instances that specify a compact placement policy, follow these steps:

  1. Create a compact placement policy.

  2. Do one of the following:

Create a HPC VM instance that uses Cloud RDMA

To create a HPC VM instance that uses Cloud RDMA, you must first create at least one regular Virtual Private Cloud (VPC) network and one Falcon VPC network. The Falcon VPC network uses an RDMA network profile that enables RDMA traffic between compute instances. This network is separate from the regular VPC network that carries non-RDMA traffic to other Cloud de Confiance services or the internet.

To create a HPC VM instance that uses Cloud RDMA, the tasks to complete are as follows:

  1. Identify or create at least two VPC networks:

    • A regular VPC network for the traffic that goes through the gVNIC network interface
    • A Falcon VPC network for the RDMA network traffic
  2. Create a HPC VM instance.

    1. For the source image, use a HPC VM image. This image includes the drivers needed for Cloud RDMA.
    2. During the instance creation, configure at least two network interfaces—one that uses the gVNIC driver and one that uses the IRDMA driver.

      For a more complete explanation, see Create an instance that uses Cloud RDMA.

  3. If you plan to run MPI applications on the HPC VM instances that use Cloud RDMA, then following the MPI configuration steps in Set up and scale MPI applications on H4D VMs with Cloud RDMA.

Access the HPC VM instance

After you create the HPC VM instance, it starts automatically. To access the instance, do one of the following:

Console

  1. In the Cloud de Confiance console, go to the VM instances page.

    Go to VM instances

  2. Click the name of your compute instance.

  3. In the Remote Access section, click the first drop-down list and choose how you want to access the instance.

Compute Engine propagates your SSH keys and creates your user. For more information, see Connecting to Linux VMs.

gcloud

To access the instance using SSH, use the gcloud compute ssh command:

gcloud compute ssh INSTANCE_NAME --zone ZONE

Compute Engine propagates your SSH keys and creates your user. For more information, see Connect to Linux VMs.

Clean up

To avoid incurring charges to your Cloud de Confiance by S3NS account for the resources used in these quickstarts, delete any HPC VM instances and all attached resources that you created.

Console

  1. In the Cloud de Confiance console, go to the VM instances page.

    Go to VM instances

  2. Select the instances that you want to delete.

  3. Click Delete.

  4. In the dialog, do the following:

    1. Optional: To delete the instances without gracefully shut them down, or end an ongoing graceful shutdown, select the Skip graceful shutdown (if applicable) checkbox.

    2. To confirm, click Delete.

  5. To delete the disks used by the deleted instances, go to the Disks page, then perform the following steps:

    Go to Disks

    1. Select the disks that you want to delete. The disks you select can't have a value in the In use by column.

    2. Click Delete.

    3. To confirm, click Delete.

gcloud

To delete one or more instances in the same zone, use the gcloud compute instances delete command. To force the deletion of the disks attached to one or more instances, include the --delete-disks flag:

gcloud compute instances delete INSTANCE_NAMES \
        --delete-disks=DELETE_DISK_TYPE \
        --zone=ZONE

Replace the following:

  • INSTANCE_NAMES: a list of instance names separated by spaces—for example, instance-01 instance-02 instance-03.

  • ZONE: the zone where the instances are located.

  • DELETE_DISK_TYPE: specify one of the following values:

    • To delete attached boot and non-boot persistent storage: all
    • To delete only attached boot persistent storage: boot
    • To delete only non-boot persistent storage: data

REST

  1. To delete an instance, make a DELETE request to the instances.delete method:

    DELETE https://compute.s3nsapis.fr/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE_NAME
    

    Replace the following:

    • PROJECT_ID: the ID of the project where the instance is located.
    • ZONE: the zone of the instance.
    • INSTANCE_NAME: the instance name.
  2. To delete a disk used by the instance, make a DELETE request to the disks.delete method:

    DELETE https://compute.s3nsapis.fr/compute/v1/projects/PROJECT_ID/zones/ZONE/disks/DISK_NAME
    

    Replace the following:

    • PROJECT_ID: the ID of the project where the disk is located.
    • ZONE: the zone where the disk is located.
    • DISK_NAME: the disk name.
  3. Repeat the previous steps for additional instances or disks.

Configure your HPC VM instance according to best practices

To get better and more predictable performance for your HPC VM instance, we recommend that you use the following best practices.

Disable simultaneous multithreading

The HPC VM image enables simultaneous multithreading (SMT), also known as Hyper-Threading on Intel processors, by default. Disabling SMT can make your performance more predictable and can decrease job times.

You can use the following methods to disable SMT:

  • To disable SMT while creating a new HPC VM instance, follow the steps to create an HPC VM instance and include the flag
    --threads-per-core=1.

  • To disable SMT on an existing HPC VM instance, connect to the instance and run the following command from the guest OS:

    sudo google_mpi_tuning --nosmt
    

For more information, see Set the number of threads per core.

Configure gVNIC as the network interface type for C2 and C2D instances

The HPC VM image supports both Virtio-net and Google Virtual NIC (gVNIC) as virtual network interfaces. Using gVNIC instead of Virtio-net can improve the scalability of MPI applications by providing better communication performance and higher throughput. Additionally, gVNIC is a prerequisite for per VM Tier_1 networking performance, which provides higher bandwidth and allows for higher throughput.

If you create a new C2 or C2D instance, then, by default, Virtio-net is used for the virtual network interface. To use gVNIC, follow the steps to create a HPC VM instance and do one of the following:

Console

To set gVNIC as the network interface, when creating the instance, in the navigation menu, click Networking. In the Networking pane that appears, do the following:

  1. Go to the Network interfaces section
  2. For Network interface card, select gVNIC.

gcloud

Include the --network-interface=nic-type=GVNIC flag in the gcloud compute instances create command.

REST

In the POST request to the instances.insert method, include "nicType": "GVNIC" in the networkInterfaces property.

The HPC VM image includes the gVNIC driver as a Dynamic Kernel Module Support (DKMS). For more information, see Using Google Virtual NIC.

Turn off Meltdown and Spectre mitigations

The HPC VM image enables the Meltdown and Spectre mitigations by default. In some cases, these mitigations might result in workload-specific performance degradation. To disable these mitigations and incur the associated security risks, do the following:

  1. Run the following command on your HPC instance:

    sudo google_mpi_tuning --nomitigation
    
  2. Reboot the instance.

Improve network performance

To improve the network performance of your instance, set up one or more of the following configurations:

  • Configure a higher bandwidth. To configure Tier_1 networking for C2 or C2D compute instances, use the gcloud compute instances create command to create the instance. Specify the --network-performance-configs flag when creating the instance. For more information, see Create instances and containers that use Tier_1 networking.

  • Use jumbo frames. To help minimize the processing overhead for network packets, we recommend using a larger packet size. You need to validate larger packet sizes for the specifics of your application. For information about the use of jumbo frames and packet sizes, see Maximum transmission unit guide.

  • Increase the TCP memory limits. Higher bandwidth requires larger TCP memory. Follow the steps to increase tcp_*mem settings.

  • Use the network-latency profile. Evaluate your application's latency and enable busy polling that reduces latency in the network receive path. Adjust the net.core.busy_poll and net.core.busy_read settings in /etc/sysctl.conf, or use tuned-adm.

Use Intel MPI 2021

Google recommends to use the Intel MPI 2021 library for running MPI jobs on Cloud de Confiance.

MPI implementations have many internal configuration parameters that can affect communication performance. These parameters are especially relevant for MPI Collective communication, which lets you specify algorithms and configuration parameters that can perform very differently in the Cloud de Confiance environment.

The HPC VM image includes a utility, google-hpc-compute, that installs the recommended MPI libraries and uses Cloud de Confiance tailored libfabric providers over the TCP transport.

Limitations

The benefits of tuning vary from application to application. In some cases, a particular tuning might have a negative effect on performance. Consider benchmarking your applications to find the most efficient or cost-effective configuration.

Use google-hpc-compute utility for Intel MPI 2021 support

The google_install_intelmpi script is the MPI related tool in the google-hpc-compute utility. It helps to install and configure Intel MPI.

The google-hpc-compute utility is included in the HPC VM image.

Install Intel MPI 2021

To install the Intel MPI library while creating a new HPC VM instance, follow the steps to create an HPC VM instance and include the following when creating the compute instance:

--metadata=google_install_intelmpi="--impi_2021"

To install the library on an existing HPC VM instance, run the following command on that compute instance:

sudo google_install_intelmpi --impi_2021 --install_dir=PATH_INSTALL_MPI

The default location for install_dir is set to /opt/intel.

Intel MPI Library and MPI collective tunings

The HPC VM image includes generic tunings which disable hyperthreading, optimize memory, modify system resource limits and apply custom tuned profiles. The google_hpc_firstrun script is designed to run automatically on the first boot of a HPC VM instance.

As a part of google-hpc-firstrun utility, the mpi-tuning script is run to improve the performance and latency of the HPC VM instance. You can run the mpi-tuning.sh script to apply tunings on individual compute instances.

Usage:
  Verify tuning steps: $ mpi_tuning OPTIONS --dryrun
  Apply tunings: $ mpi_tuning OPTIONS

Options:
  --hpcprofile       Install and apply google-hpc-compute tuned profile
                     Also applies: --tcpmem, --limits
  --hpcthroughput    Install and apply google-hpc-compute-throughput profile
                     Also applies: --tcpmem, --limits
  --tcpmem           Increase memory for TCP
  --limits           Change the system ulimits
  --nosmt            Disable simultaneous multi threading
  --nofirewalld      Disable firewalld
  --noselinux        Disable SE Linux (reboot required)
  --nomitigation     Disable CPU vulnerabilities mitigations (reboot required)
  --reboot           Reboot system after tunings if required
  --dryrun           Do not execute commands
  --verbose          Print verbose messages
  --help             Show help message

Create a custom image using the HPC VM image

To implement the best practices at scale, create a custom OS image to use with your HPC VM instances. Complete the following tasks to create a custom image to use when creating HPC VM instances:

  1. Create a compute instance that uses the HPC VM image.

  2. Customize the compute instance with MPI tunings.

  3. Create a custom image using the boot disk of your HPC VM image as the source disk. You can do so using the Cloud de Confiance console or the Google Cloud CLI.

Console

  1. In the Cloud de Confiance console, go to the Images page.

    Go to Images

  2. Click Create image.

  3. Specify a Name for your image.

  4. Under Source disk, select the name of the boot disk on your HPC VM instance.

  5. Choose other remaining properties for your image.

  6. Click Create.

gcloud

Create the custom image by using the images create command.

gcloud compute images create IMAGE_NAME \
         --source-disk=INSTANCE_NAME \
         --source-disk-zone=ZONE \
         --family=IMAGE_FAMILY \
         --storage-location=LOCATION

Replace the following:

  • IMAGE_NAME: name for the custom image.
  • INSTANCE_NAME: name of your HPC VM instance.
  • ZONE: zone where your HPC VM instance is located.
  • IMAGE_FAMILY: optional. The image family this image belongs to.
  • LOCATION: optional. Region in which to store the custom image. The default location is the multi-region closest to the location of the source disk.

Pricing

The HPC VM image is available at no additional cost. Because the HPC VM image runs on Compute Engine, you might incur charges for Compute Engine resources such as vCPUs, disks, and memory.

To learn more, see Compute Engine pricing.

What's next