How to Choose the Right Google Cloud Compute Engine Machine Type

calendar November 4, 2020

Beyond the N1 Machine Type Family

For many years after the inception of Compute Engine on June 28, 2012 (GA December 2, 2013), N1 was the only Google Cloud machine type family offered. In many ways, the situation was similar to the advent of the Ford Model T, of which Henry Ford said, “Any customer can have a car painted any color that he wants—so long as it is black.”

You can have any machine type—so long as it is N1
GCP Machine Catalog Prior to 2019

The N1 machine type is offering 22 predefined machine types with anywhere from 1 to 96 vCPUs with up to 624 GB of RAM in N1 (and even more with the memory-optimized ultramem machine types offered later, but now rebranded as M1).

There are three flavors of predefined N1 machines:

n1-standard
1 to 96 vCPUs with 3.75 GB of memory per vCPU
n1-highmem
2 to 96 vCPUs with 6.5 GB of memory per vCPU
n1-highcpu
2 to 96 vCPUs with 0.9 GB of memory per vCPU
n1-standard vs. n1-highmem vs. n1-highcpu
N1 Predefined Machine Types

One unique feature of GCP is the ability to create custom machine types with your choice of number of vCPUs and amount of memory, as long as they are within the allowed ratio of CPU to memory. This ratio is depicted by the shaded triangle in the preceding chart. Going outside the triangle is possible if you enable extended memory features, but then you are paying extra and effectively buying but not enabling additional vCPUs or memory to keep your instance inside the triangle anyway.

Another interesting point of N1 trivia is that these instances have been offered for so long that they have spanned five generations of Intel CPU platforms:

  1. Sandy Bridge
  2. Ivy Bridge
  3. Haswell
  4. Broadwell
  5. Skylake

You could end up with any one of these CPU types depending on the Compute Engine cloud region and zone you chose and your luck as Google was rolling out new hardware across its data centers. Eventually, old gear would be replaced with new gear, and with that, your N1 instance would be upgraded—at least, such was the story until 2019.

C2, M2, N2, N2D, & E2 Families

The N1 lost its exclusivity on GCP machines in April 2019, when compute-optimized C2 and memory-optimized M2 machine types were announced.

C2 and M2 Machine Types

C2 instances deliver high per-thread performance and memory speed with a greater than 40% performance improvement, while M2 instances are a bit more special-purpose and provide massive memory capacity for memory-intensive workloads like SAP HANA DB or in-memory data analytics workloads. C2 and M2 went GA in July and August 2019.

N2 Machine Types

On August 12, 2019 the newer general purpose N2 machine types were announced which went GA on September 27, 2019. N2 is based on the Intel Cascade Lake platform and claims to offer greater than a 20% performance improvement for many workloads and also supports up to 25% more memory per vCPU.

E2 Machine Types

A couple of months later, on December 11, 2019, new cost-optimized general purpose E2 VMs were announced, which went GA on March 19, 2020. E2 is promising 31% savings compared to similar N1 machines.

N2D Machine Types

Finally, the AMD EPYC-based general purpose N2D Compute Engine family was officially announced on February 18, 2020 (GA on April 6, 2020). N2D are promising savings of up to 13% over comparable N-series instances, and up to a 39% performance improvement in benchmarks compared to comparable N1 instances.

After adding the new families mentioned above, Google Cloud offers a substantial catalog of 108 predefined machine types across eight families. In addition, with custom machine types being offered in four of those families, the number of unique machine types available to your organization can be much larger.

Google Cloud Compute Engine Machine Type Comparison
Machine Type Family Description CPU Architecture vCPU Range Memory Range (GB) Predefined Machines Custom Machines
N1 General Purpose The original machine type which is updated over time to the latest Intel CPU platform Skylake, Broadwell, Haswell, Sandy Bridge, and Ivy Bridge 1–96 2–624 8 standard, 7 highmem, and 7 highcpu Yes
N2 General Purpose Newer platform offering 20% price-to-performance improvement and 25% more memory per vCPU Cascade Lake 2–80 2–640 8 standard, 8 highmem, and 8 highcpu Yes
N2D General Purpose Newer AMD platform offering 13% savings over the N series and up to a 39% performance improvement in benchmarks AMD EPYC Rome 2–224 2–896 11 standard, 9 highmem, and 11 highcpu Yes
E2 General Purpose Offers 31% savings compared to N1 machines Skylake, Broadwell, Haswell, and AMD EPYC Rome 2–32 8–128 5 standard, 4 highmem, and 5 highcpu Yes
F1, G1, and E2 Shared-Core Cost-effective for less resource-intensive workloads varies 0.2–1 0.6–4 2 micro, 2 small, and 1 medium No
C2 Compute-Optimized Offers over a 40% performance improvement compared to N1 machines Cascade Lake 4–60 16–240 5 standard No
M1 Memory–Optimized Offers massive RAM (originally part of the N1 family) Skylake, Broadwell E7 40, 80, 96, and 160 961, 1,922, 1,433, and 3,844 3 ultramem and 1 megamem No
M2 Memory-Optimized Newer platform offering even larger RAM Cascade Lake 208 and 416 5,888 and 11,776 2 ultramem and 1 megamem No

Migrating from N1 to N2 & N2D or E2

First, we compare N1 with N2 and N2D instances:

Memory versus vCPUs for n1-standard, n1-highmem, n1-highcpu, n2d-standard, n2d-highmem, and n2d-highcpu
N1 vs. N2 & N2D Comparable Machine Types (up to 96 vCPUs)

N2 and N2D provide additional coverage in terms of possible CPU-to-memory combinations (the shaded area on the chart). These families also offer better performance. Considering that the price is the same per vCPU and GB of RAM in the case of N2 or 13% cheaper for N2D upgrading, they seems to be great options.

The times when you were getting your upgrades automatically while staying on N1 are over, so if you want the latest CPU Platform it is time to consider upgrading from N1. If you keep using N1, it’s like staying with your old higher priced mobile phone plan or cable package while ignoring newer, cheaper, and better options. In fact, the nature of constantly-changing and upgrading public cloud offerings creates the need for continuous, daily optimization instead of project-driven optimization cycles.

Next, let us compare E2 vs. N1:

N1 vs. E2 Comparable Machine Types

We can see that E2 configuration coverage area (the shaded area above) provides a bit more flexibility for memory configurations up to 16 vCPUs and allows for up to 32 vCPUs, while larger N1 instances don’t have any equivalent E2 configurations.

E2 being cost-optimized does not come with a guarantee of the newer CPU architecture or any specific architecture for that matter, and, as such, will likely provide an equivalent or possibly even lower performance than a comparable N1 instance. Yet, the cost savings can be quite significant with E2 instances being offered 31% cheaper vs. N1/N2 price.

In the end, the decision of changing from N1 is up to you. This decision is also a great driver to evaluate the performance of your apps and decide whether you want to save money and get equivalent performance for less, or spend the same amount and improve app performance. The answer may not be the same for every application and every environment. You might need to develop a strategy and an execution plan so that the changes are manageable and come with the least amount of risk.

Automating Google Cloud Compute Engine Instance Selection

At Densify we are helping organizations to manage and continuously optimize cloud resources for GCP, AWS, and Azure. Densify cloud and container resource management considers a detailed configuration and utilization profile of your workloads and evaluates this against the IaaS cloud provider’s offerings in your region, looking at performance characteristics, costs, migration considerations, and a multitude of other factors.

Densify routinely helps enterprises overcome the challenges multi-generation instance catalogs bring, and provides the technology and expertise to help you develop and execute the best FinOps plan for your organization, setting you on a path of continuous, automated cloud optimization and management.

Request a GCP Optimization Demo