Choosing the right VM: a quick guide

jmswain
Staff

Overview

With Google Compute Engine’s variety of virtual machine (VM) families, you have the power to optimize every workload for whatever it needs, like cost, performance, or flexibility.

Need help choosing the right instance? We recently published a 5-minute explainer video. This blog explores VM selection in more detail, through 4 easy steps to get up and running on Compute Engine in no time.

Step 1: General purpose or specialized?

Compute Engine’s VMs are organized based on what your workload is optimizing for, like high performance, storage, or memory. To make it easy, all of our VMs fall into two categories:

  • General Purpose: VMs that provide a balanced mix of compute, networking, and storage resources to serve the majority of applications and workloads, like web applications, databases, game servers, and dev/test environments. If you are not sure, general purpose is a good starting point.
  • Specialized: VMs tuned for the maximum performance of a specific resource, like compute, memory, storage, or GPUs. These VMs are tied to specific workload types such as large in-memory SAP HANA databases, high performance computing, data warehouses and AI/ML.

Step 2: Which machine family is right for you?

Within these two categories, there are multiple different “VM Families,” each represented by a letter (E, N, C, H, M, X, Z, G, and A). General Purpose VM Families are naturally suited for your most common workloads, while Specialized VMs are focused on specific resource needs (e.g. the Z-Family for storage-dense workloads).

So how do you choose the right one if there are multiple that fit a specific workload’s needs? You can make trade-offs based on your priorities and what you’re optimizing for. The best way to do this is to test and experiment! We also offer many performance benchmarks, recommended best-fit workloads, and more information in our documentation for you to reference while you compare, so you’re armed with everything you need to make the right decision.

VM Table: In general, we recommend most common workloads start with General Purpose VMs.VM Table: In general, we recommend most common workloads start with General Purpose VMs.

 General Purpose VMs:

  • N is for balanced price and performance across a wide variety of general-purpose workloads, providing a flexible option for everyday workloads that need a balance of performance and cost. Our latest gen N4 offers custom shapes and next-generation Dynamic Resource Management for added efficiency.
  • C is for consistently high performance for your most demanding, latency-sensitive general-purpose workloads. Our latest gen C4 offloads virtual storage, networking and management tasks to Titanium to improve infrastructure performance. And it offers enhanced maintenance for predictability and control.
  • E offers the lowest price per core for your non-latency sensitive general-purpose workloads. E2 also offers custom shapes for added flexibility. Learn more about E2 here.
Specialized VMs:
  • H are compute-optimized, offering the highest performance per core on Compute Engine and are optimized for compute-intensive and high performance computing (HPC) workloads. Check out our latest gen H3.
  • M and X are memory-optimized, offering the highest memory to compute ratios of any Compute Engine offering, with up to 32 TB for a single instance, and an industry leading 99.95% Single Instance SLA. They are ideal for workloads that require higher memory-to-vCPU ratios than the high-memory machine types in the general-purpose machine series. Check out our latest gen X4.
  • Z is storage-optimized for workloads that are low in core usage and high in storage density. For example, the Z3 machine series is useful for scale-out analytics workloads, flash-optimized databases, and other database workloads. Check out our latest gen Z3.
  • Accelerator-optimized (G, A) VMs are designed to deliver the performance and efficiency for GPU accelerated high performance computing workloads such as artificial intelligence (AI), machine learning (ML), and training and inference. Each machine type within a series has a specific model and number of NVIDIA GPUs attached. Check out our latest gen A3.

Step 3: Which machine type should you choose?

The next step is choosing the right VM type and instance within a family. To do that, you need to understand how our VMs are named. There are a few parts to every name:

  • Machine Family (also known as “VM Family”): This tells you the category or family.
  • Machine Series: This number tells you the generation of the machine series in ascending order, so C4 is the fourth generation while C3 is the third generation.
  • Processor: This tells you the processor type.
    • D VMs are powered by AMD processors. E.g. C3D
    • A VMs are powered by Google Axion Processors. E.g. C4A
    • VMs without a letter suffix are powered by Intel processors. E.g. C4
  • Machine Type (also known as “shape configuration”): This indicates the CPU-to-memory ratio (e.g., standard, highcpu, highmem) for the chosen machine shape. Every machine series offers at least one machine type, while some, like the General Purpose C-series, offer all three machine types. Check out this machine comparison for more information.

image3.png

  • vCPU Count: This tells you the number of CPUs in the shape.

For example, C3D is a third generation C-series VM, running on an AMD processor. C3D-highmem-16 is a 16 vCPU shape with a highmem ratio (1:8) of memory per vCPU.

Understanding how much vCPU and memory you need for a workload is critical so you’re not paying for resources you don’t need. For example, with C3D there are three shape options with 16 vCPU but with different amounts of corresponding memory, depending on the shape configuration (highmem, standard, highcpu), as shown in the table below:

Shape Ratio vCPU Memory (GB)
C3D-highmem-16 1:8 16 128
C3D-standard-16 1:4 16 64
C3D-highcpu-16 1:2 16 32

With C3D-highmem-16, you get 16 vCPU and 128 GB of memory. If your database uses all of the vCPU but only half of the memory, you’re paying for excess memory you’re not using. Instead, a standard machine type would you give you the same vCPU capability with less memory. For example, a C3D-standard-16, which has a standard ratio (1:4) of vCPU to memory would give you 16 vCPU and 64 GB of memory. This perfectly meets the need for your database without having to waste extra memory you don’t use.

Step 4: How do you get started?

image1.pngIf you’re unsure, start small. You can change your selection any time. Keep in mind, as we add more machine families and generations to our portfolio, your options might change.

Check out these resources to find the perfect fit:

There are three ways to spin up your first VM:

  1. Complete a tutorial. Learn how to deploy a Linux VM, Windows Server VM, load balanced VM, Java app, custom website, LAMP stack, and much more.
  2. Deploy a pre-configured sample application—Jump Start Solution—in just a few clicks.
  3. Create a VM from scratch using the Google Cloud console, CLI, API, or Client Libraries like C#, Go, and Java. Use our documentation for step-by-step guidance.

We hope this guide has helped you simplify the VM selection process. Happy computing!

2 1 411