How to Choose the Right Google Cloud Compute Engine Machine Type

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 FamilyDescriptionCPU ArchitecturevCPU RangeMemory Range (GB)Predefined MachinesCustom Machines
N1 General PurposeThe original machine type which is updated over time to the latest Intel CPU platformSkylake, Broadwell, Haswell, Sandy Bridge, and Ivy Bridge1–962–6248 standard, 7 highmem, and 7 highcpuYes
N2 General PurposeNewer platform offering 20% price-to-performance improvement and 25% more memory per vCPUCascade Lake2–802–6408 standard, 8 highmem, and 8 highcpuYes
N2D General PurposeNewer AMD platform offering 13% savings over the N series and up to a 39% performance improvement in benchmarksAMD EPYC Rome2–2242–89611 standard, 9 highmem, and 11 highcpuYes
E2 General PurposeOffers 31% savings compared to N1 machinesSkylake, Broadwell, Haswell, and AMD EPYC Rome2–328–1285 standard, 4 highmem, and 5 highcpuYes
F1, G1, and E2 Shared-CoreCost-effective for less resource-intensive workloadsvaries0.2–10.6–42 micro, 2 small, and 1 mediumNo
C2 Compute-OptimizedOffers over a 40% performance improvement compared to N1 machinesCascade Lake4–6016–2405 standardNo
M1 Memory–OptimizedOffers massive RAM (originally part of the N1 family)Skylake, Broadwell E740, 80, 96, and 160961, 1,922, 1,433, and 3,8443 ultramem and 1 megamemNo
M2 Memory-OptimizedNewer platform offering even larger RAMCascade Lake208 and 4165,888 and 11,7762 ultramem and 1 megamemNo

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