Machine types

A machine type is a set of virtualized hardware resources available to a virtual machine (VM) instance, including the system memory size, virtual CPU (vCPU) count, and persistent disk limits. In Compute Engine, machine types are grouped and curated for different workloads. You can choose from general-purpose machine types, memory-optimized machine types, and compute-optimized machine types.

Choosing a machine type is required when creating an instance. You can select from a number of predefined machine types in each machine type family. If the predefined machine types do not meet your needs, you can create your own custom machine types.

Billing

You are billed for the resources that a VM instance uses. When you create a VM instance, you select a machine type for the instance and are billed as described in the VM instances pricing page. Specifically, you are billed for each vCPU and GB of memory individually, as described in resource-based billing model. Applicable discounts, such as sustained use discounts and committed use discounts apply.

To see the calculated hourly and monthly cost for each machine type, see VM instances pricing.

Machine type families

Machine types are divided into machine type families that are curated for specific workload types. The following primary machine types are offered on Compute Engine:

  • General-purpose machine types. General-purpose machine types offer the best price-performance ratio for a variety of workloads. These machine types are available in two generations:

    • The first generation N1 machine types. These machine types offer up to 96 vCPUs, 6.5 GB of memory per vCPU, and are available on Intel Sandy Bridge, Ivy Bridge, Haswell, Broadwell, and Skylake CPU platforms.
    • The latest generation N2 machine types. These machine types offer up to 80 vCPUs, 8 GB of memory per vCPU, and are available on the Intel Cascade Lake CPU platforms.
  • Compute-optimized machine types. Compute-optimized machine types offer the highest performance per core on Compute Engine and are optimized for compute-intensive workloads. These machine types offer Intel Scalable Processors (Cascade Lake) and up to 3.8 GHz sustained all-core turbo.

  • Memory-optimized machine types. Memory-optimized machine types are ideal for memory-intensive workloads. These machine types offer higher memory per core than other machine type families, with up to 12 TB of memory.

Determining a machine type for your workload

Use the table below to compare each category of machine type to determine which type is appropriate for your workload. If, after reviewing this section, you are still unsure which machine type is best for your workload, using a general-purpose machine type is a good place to start.

Machine types Memory (per vCPU) vCPUs Custom machine types? Sustained-use discounts? Local SSDs? Processors
General-purpose (N2) 0.5–8 GB 2–80 Yes Yes Yes
  • Cascade Lake
General-purpose (N1) 0.95–6.5 GB 1–96 Yes Yes Yes
  • Skylake
  • Broadwell
  • Haswell
  • Ivy Bridge
  • Sandy Bridge
Compute-optimized 4 GB 4–60 No Yes Yes
  • Cascade Lake
Memory-optimized 28 GB 40–416 No Yes No
  • Broadwell E7
  • Cascade Lake
Shared-core 0.60 GB 0.2–0.5 No No No
  • N/A

Alternatively, use the following guide to help you pick a machine type. Click the diagram for a larger version.

General-purpose machine type family

General-purpose machine types offer the best price-performance ratio for a variety of workloads. If you are not sure which machine type is best for your workload, using a general-purpose machine type is a good place to start.

General-purpose machine types currently include the first generation N1 machine types and the latest N2 generation machine types.

N1 machine types

N1 machine types are Compute Engine's first generation general-purpose machine types. They are available on Skylake, Broadwell, Haswell, Ivy Bridge, and Sandy Bridge CPU platforms. N1 machine types provide the following benefits:

  • Support up to 96 vCPUs and 624 GB of memory.
  • Are available as both predefined machine types and custom machine types. Custom machine types can be created within a wide range of memory-to-core ratio, ranging from 0.95 GB per vCPU to 6.5 GB per vCPU.
  • Offer higher memory-to-core ratios for VMs created with the extended memory feature.
  • Offer a larger sustained use discount than N2 machine types.

The following list shows the available N1 predefined machine types.

N1 standard machine types

Machine name vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB) Local SSD Network bandwidth (Gbps)3
n1-standard-1 1 3.75 128 257 Yes 2
n1-standard-2 2 7.50 128 257 Yes 10
n1-standard-4 4 15 128 257 Yes 10
n1-standard-8 8 30 128 257 Yes 16
n1-standard-16 16 60 128 257 Yes 324
n1-standard-32 32 120 128 257 Yes 324
n1-standard-64 64 240 128 257 Yes 324
n1-standard-96 96 360 128 257 Yes 324

1A vCPU is implemented as a single hardware Hyper-thread on one of the available CPU platforms.
2Persistent disk usage is charged separately from machine type pricing.
3Network bandwidth is up to the specified limit. Actual performance depends on factors such as network congestion or protocol overhead.
432 Gbps for Skylake or later CPU platforms. 16 Gbps for all other platforms.

N1 high-memory machine types

N1 high-memory machine types have 6.50 GB of system memory per vCPU.

Machine name vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB) Local SSD Network bandwidth (Gbps)3
n1-highmem-2 2 13 128 257 Yes 10
n1-highmem-4 4 26 128 257 Yes 10
n1-highmem-8 8 52 128 257 Yes 16
n1-highmem-16 16 104 128 257 Yes 324
n1-highmem-32 32 208 128 257 Yes 324
n1-highmem-64 64 416 128 257 Yes 324
n1-highmem-96 96 624 128 257 Yes 324

1A vCPU is implemented as a single hardware Hyper-thread on one of the available CPU platforms.
2Persistent disk usage is charged separately from machine type pricing.
3Network bandwidth is up to the specified limit. Actual performance depends on factors such as network congestion or protocol overhead.
432 Gbps for Skylake or later CPU platforms. 16 Gbps for all other platforms.

N1 high-CPU machine types

High-CPU machine types are ideal for tasks that require a moderate increase of vCPUs relative to memory. High-CPU machine types have 0.90 GB of memory per vCPU.

Machine name vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB) Local SSD Network bandwidth (Gbps)3
n1-highcpu-2 2 1.80 128 257 Yes 10
n1-highcpu-4 4 3.60 128 257 Yes 10
n1-highcpu-8 8 7.20 128 257 Yes 16
n1-highcpu-16 16 14.4 128 257 Yes 324
n1-highcpu-32 32 28.8 128 257 Yes 324
n1-highcpu-64 64 57.6 128 257 Yes 324
n1-highcpu-96 96 86.4 128 257 Yes 324

1A vCPU is implemented as a single hardware Hyper-thread on one of the available CPU platforms.
2Persistent disk usage is charged separately from machine type pricing.
3Network bandwidth is up to the specified limit. Actual performance depends on factors such as network congestion or protocol overhead.
432 Gbps for Skylake or later CPU platforms. 16 Gbps for all other platforms.

N2 machine types

N2 machine types are the newest generation general-purpose machine types that offer flexible sizing between 2 to 80 vCPUs and 0.5 to 8 GB of memory per vCPU. N2 VMs run on Cascade Lake CPUs with a base frequency of 2.8 GHz and a sustained all core turbo of 3.4 GHz. These machine types also offer an overall performance improvement over N1 machine types.

Workloads that can take advantage of the higher clock frequency are a good choice for N2 machine types. These workloads can get higher per-thread performance while benefiting from all the flexibility that a general-purpose machine type offers.

In summary, N2 machine types:

  • Support up to 80 vCPUs and 640 GB of memory.
  • Are available as both predefined machine types and custom machine types. Custom machine types can be created within a wide range of memory-to-core ratio, ranging from 0.5 GB per vCPU to 8 GB per vCPU.
  • Offer higher memory-to-core ratios for VMs created with the extended memory feature. Using the extended memory feature helps control per-CPU software licensing costs while providing access to more RAM than 8 GB per vCPU.
  • Run on the latest available infrastructure technology with Intel Xeon Scalable Processors (Cascade Lake) running at 2.8 GHz, and with up to 3.4 GHz in sustained all-core-turbo.
  • Are only available on select CPU platforms.

N2 machine types are only available in select zones and regions. The following list shows the available N2 predefined machine types.

N2 standard machine types

Machine name vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB) Local SSD Network bandwidth (Gbps)3
n2-standard-2 2 8 128 257 Yes 10
n2-standard-4 4 16 128 257 Yes 10
n2-standard-8 8 32 128 257 Yes 16
n2-standard-16 16 64 128 257 Yes 32
n2-standard-32 32 128 128 257 Yes 32
n2-standard-48 48 192 128 257 Yes 32
n2-standard-64 64 256 128 257 Yes 32
n2-standard-80 80 320 128 257 Yes 32

1A vCPU is implemented as a single hardware Hyper-thread on one of the available CPU platforms.
2Persistent disk usage is charged separately from machine type pricing.
3Network bandwidth is up to the specified limit. Actual performance depends on factors such as network congestion or protocol overhead.

N2 high-memory machine types

N2 high-memory machine types have 8 GB of system memory per vCPU.

Machine name vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB) Local SSD Network bandwidth (Gbps)3
n2-highmem-2 2 16 128 257 Yes 10
n2-highmem-4 4 32 128 257 Yes 10
n2-highmem-8 8 64 128 257 Yes 16
n2-highmem-16 16 128 128 257 Yes 32
n2-highmem-32 32 256 128 257 Yes 32
n2-highmem-48 48 384 128 257 Yes 32
n2-highmem-64 64 512 128 257 Yes 32
n2-highmem-80 80 640 128 257 Yes 32

1A vCPU is implemented as a single hardware Hyper-thread on one of the available CPU platforms.
2Persistent disk usage is charged separately from machine type pricing.
3Network bandwidth is up to the specified limit. Actual performance depends on factors such as network congestion or protocol overhead.

N2 high-CPU machine types

High-CPU machine types are ideal for tasks that require a moderate increase of vCPUs relative to memory. High-CPU machine types have 1 GB of memory per vCPU.

Machine name vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB) Local SSD Network bandwidth (Gbps)3
n2-highcpu-2 2 2 128 257 Yes 10
n2-highcpu-4 4 4 128 257 Yes 10
n2-highcpu-8 8 8 128 257 Yes 16
n2-highcpu-16 16 16 128 257 Yes 32
n2-highcpu-32 32 32 128 257 Yes 32
n2-highcpu-48 48 48 128 257 Yes 32
n2-highcpu-64 64 64 128 257 Yes 32
n2-highcpu-80 80 80 128 257 Yes 32

1A vCPU is implemented as a single hardware Hyper-thread on one of the available CPU platforms.
2Persistent disk usage is charged separately from machine type pricing.
3Network bandwidth is up to the specified limit. Actual performance depends on factors such as network congestion or protocol overhead.

Custom machine types

If none of the general-purpose predefined machine types match your needs, you can create a custom machine type with the number of vCPUs and amount of memory that you need for your instance.

Custom machine types are ideal for the following scenarios:

  • Workloads that are not a good fit for the predefined machine types that are available to you.
  • Workloads that require more processing power or more memory, but don't need all of the upgrades that are provided by the next larger predefined machine type.

It costs slightly more to use a custom machine type than an equivalent predefined machine type, and there are still some limitations in the amount of memory and vCPUs you can select. For more information, see Creating a VM instance with a custom machine type.

Memory-optimized machine type family

Memory-optimized machine types are ideal for tasks that require intensive use of memory with higher memory-to-vCPU ratios than the N1 high-memory machine types. These machine types are suited for in-memory databases and in-memory analytics, such as SAP HANA and business warehousing (BW) workloads, genomics analysis, SQL analysis services, and so on.

Memory-optimized machine types are only available as predefined machine types. These machine types offer at least from 14 GB to 28 GB memory per vCPU. The following restrictions apply:

M1 machine types

M1 machine types are the first generation memory-optimized machine types that offer 24 GB of memory per vCPU. This set of machine types comes in two types: m1-ultramem and m1-megamem. To see if ultramem or megamem machine types are available in a certain zone, see Available regions and zones.

Machine name vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB) Local SSD Network bandwidth (Gbps)3
m1-ultramem-40 40 961 128 257 No 32
m1-ultramem-80 80 1922 128 257 No 32
m1-ultramem-160 160 3844 128 257 No 32
Machine name vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB) Local SSD Network bandwidth (Gbps)3
m1-megamem-96 96 1433.6 128 257 No 32

1A vCPU is implemented as a single hardware Hyper-thread on one of the available CPU platforms.
2Persistent disk usage is charged separately from machine type pricing.
3Network bandwidth is up to the specified limit. Actual performance depends on factors such as network congestion or protocol overhead.

M2 machine types

If the machine types above do not match your workloads, you can choose from the following list of machine types that have larger amounts of memory per vCPU. M2 ultramem machine types offer on-demand pricing for an evaluation period only. Long running usage requires purchasing a committed use contract. See Pricing page for more details.

Machine name vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB) Local SSD Network bandwidth (Gbps)3
m2-ultramem-2084 208 5888 128 257 No 325
m2-ultramem-4164 416 11,776 128 257 No 325

1A vCPU is implemented as a single hardware Hyper-thread on one of the available CPU platforms.
2Persistent disk usage is charged separately from machine type pricing.
3Network bandwidth is up to the specified limit. Actual performance depends on factors such as network congestion or protocol overhead.
4M2 ultramem machine types offer on-demand pricing for an evaluation period only. Long running usage requires purchasing a committed use contract. See Pricing page for more details.
532 Gbps for Skylake or later CPU platforms. 16 Gbps for all other platforms.

Compute-optimized machine type family

Compute-optimized machine types are ideal for compute-intensive workloads. These machine types offer the highest performance per core on Compute Engine.

Compute-optimized types are only available as predefined machine types and include the C2 machine types.

C2 machine types

Built on the latest generation Intel Scalable Processors (Cascade Lake), C2 machine types offer up to 3.8 GHz sustained all-core turbo and provide full transparency into the architecture of the underlying server platforms, letting you fine-tune the performance. C2 machine types offer much more computing power, run on a newer platform, and are generally more robust for compute-intensive workloads than the N1 high-CPU machine types.

C2 machine types have the following restrictions:

Machine name vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB) Local SSD Network bandwidth (Gbps)3
c2-standard-4 4 16 128 257 Yes 10
c2-standard-8 8 32 128 257 Yes 16
c2-standard-16 16 64 128 257 Yes 32
c2-standard-30 30 120 128 257 Yes 32
c2-standard-60 60 240 128 257 Yes 32

1A vCPU is implemented as a single hardware Hyper-thread on one of the available CPU platforms.
2Persistent disk usage is charged separately from machine type pricing.
3Network bandwidth is up to the specified limit. Actual performance depends on factors such as network congestion or protocol overhead.

Shared-core machine types

Shared-core machine types provide one vCPU that is allowed to run for a portion of the time on a single hardware Hyper-thread on the host CPU running your instance. Shared-core instances can be more cost-effective for running small, non-resource intensive applications than standard, high-memory or high-CPU machine types.

CPU Bursting

f1-micro and g1-small machine types offer bursting capabilities that allow instances to use additional physical CPU for short periods of time. Bursting happens automatically when your instance requires more physical CPU than originally allocated. During these spikes, your instance will opportunistically take advantage of available physical CPU in bursts. Note that bursts are not permanent and are only possible periodically. Bursting doesn't incur any additional charges. You are charged the listed on-demand price for f1-micro and g1-small machine types.

Machine name vCPUs Memory (GB) Max number of persistent disks (PDs)1 Max total PD size (TB) Local SSD Network bandwidth (Gbps)2
f1-micro 0.2 0.60 16 3 No 1
g1-small 0.5 1.70 16 3 No 1

1Persistent disk usage is charged separately from machine type pricing.
2Network bandwidth is up to the specified limit. Actual performance depends on factors such as network congestion or protocol overhead.

GPUs and machine types

You can attach GPUs only to general-purpose N1 machine types. GPUs are not supported for other machine types.

Instances with lower numbers of GPUs are limited to a maximum number of vCPUs. In general, a higher number of GPUs allows you to create instances with a higher number of vCPUs and memory. For more information, see GPUs on Compute Engine.

What's next

Was this page helpful? Let us know how we did:

Send feedback about...

Compute Engine Documentation