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 by families for different workloads. You can choose from general-purpose, memory-optimized, and compute-optimized families.
You must choose a machine type when you create 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.
To compare machine type performance, see CPU platforms.
Try it for yourself
If you're new to Google Cloud, create an account to evaluate how Compute Engine performs in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
Try Compute Engine freeBilling
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 types
Each machine type family includes different machine types. Each family is curated for specific workload types. The following primary machine types are offered on Compute Engine:
General-purpose machine types offer the best price-performance ratio for a variety of workloads.
- E2 machine types are cost-optimized VMs that offer up to 32 vCPUs with up to 128 GB of memory with a maximum of 8 GB per vCPU. E2 machines have a predefined CPU platform running either an Intel or the second generation AMD EPYC Rome processor. E2 VMs provide a variety of compute resources for the lowest price on Compute Engine, especially when paired with committed-use discounts.
- N2 machine types offer up to 80 vCPUs, 8 GB of memory per vCPU, and are available on the Intel Cascade Lake CPU platforms.
- N2D machine types offer up to 224 vCPUs, 8 GB of memory per vCPU, and are available on second generation AMD EPYC Rome platforms.
- N1 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.
Memory-optimized machine types are ideal for memory-intensive workloads because they offer more memory per core than other machine types, with up to 12 TB of memory.
Compute-optimized machine types offer the highest performance per core on Compute Engine and are optimized for compute-intensive workloads. Compute-optimized machine types offer Intel Scalable Processors (Cascade Lake) and up to 3.8 GHz sustained all-core turbo.
Accelerator-optimized machine types are ideal for massively parallelized CUDA compute workloads, such as machine learning (ML) and high performance computing (HPC).
Shared-core machine types are available in the E2 and N1 families. These machine types timeshare a physical core. This can be a cost-effective method for running small, non-resource intensive applications.
- E2:
e2-micro
,e2-small
, ande2-medium
shared-core machine types have 2 vCPUs available for short periods of bursting. - N1:
f1-micro
andg1-small
shared-core machine types have up to 1 vCPU available for short periods of bursting.
- E2:
Recommendations for machine types
The following table provides machine type recommendations for different workloads.
E2 General purpose |
N2, N2D, N1 General purpose |
M2, M1 Memory-Optimized |
C2 Compute-Optimized |
A2 Accelerator-Optimized |
---|---|---|---|---|
Day-to-day computing at a lower cost | Balanced price/performance across a wide range of VM shapes | Ultra high-memory workloads | Ultra high performance for compute-intensive workloads | Optimized for high performance computing workloads |
|
|
|
|
|
Machine type comparison
Use the following table to compare each category of machine type and 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 (E2)1 | 0.5–8 GB2 | 2–32 | Yes | No | No |
|
General-purpose (N2) | 0.5–8 GB | 2–80 | Yes | Yes | Yes |
|
General-purpose (N2D)3 | 0.5–8 GB | 2–224 | Yes | Yes | Yes |
|
General-purpose (N1) | 0.95–6.5 GB | 1–96 | Yes | Yes | Yes |
|
Compute-optimized | 4 GB | 4–60 | No | Yes | Yes |
|
Memory-optimized ultramem | 24 GB | 40–416 | No | Yes | No |
|
Memory-optimized megamem | 24 GB | 96 | No | Yes | Yes |
|
Accelerator-optimized high-gpu | 7 GB | 12–96 | No | No | Yes |
|
Accelerator-optimized mega-gpu | 14 GB | 96 | No | No | Yes |
|
E2 shared-core | 4 GB | 0.25–1 | No | No | No |
|
N1 shared-core | 3.0–3.4 GB | 0.2–0.5 | No | Yes | No |
|
2E2 machine types support up to 128 GB of memory total.
3N2D standard and high-CPU machine types have up to 224 vCPUs.
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.
E2 machine types
E2 machine types are cost-optimized machine types that offer sizing between 2 to 32 vCPUs and 0.5 to 8 GB of memory per vCPU. E2 machine types are available on the following predefined CPU platforms: Intel Skylake, Broadwell, Haswell, and AMD EPYC Rome processors.
Small to medium workloads that require at most 32 vCPUs but do not require local SSDs or GPUs are an ideal fit for E2 machines. E2 machine types do not offer sustained-use discounts; however, they do provide consistently low on-demand and committed-use pricing.
In summary, E2 machine types:
- Support up to 32 vCPUs and 128 GB of memory.
- Support the virtio memory balloon device.
- Are available in predefined and custom machine types.
- Offers the lowest on-demand pricing across the general-purpose machine types.
- Powered by an Intel or AMD EPYC Rome processor (selected at instance creation by Compute Engine based on availability).
E2 machine types do have some limitations when compared with other general-purpose machine types, including:
- No sustained-use discounts.
- No control over processor type.
E2 machine types are available in all regions and zones.
E2 standard machine types
Machine name | vCPUs1 | Memory (GB) | Max number of persistent disks (PDs)2 | Max total PD size (TB) | Local SSD | Maximum egress bandwidth (Gbps)3 |
---|---|---|---|---|---|---|
e2-standard-2 |
2 | 8 | 128 | 257 | No | 4 |
e2-standard-4 |
4 | 16 | 128 | 257 | No | 8 |
e2-standard-8 |
8 | 32 | 128 | 257 | No | 16 |
e2-standard-16 |
16 | 64 | 128 | 257 | No | 16 |
e2-standard-32 |
32 | 128 | 128 | 257 | No | 16 |
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.
3Maximum egress bandwidth cannot exceed the number given. Actual
egress bandwidth depends on the destination IP address and other factors.
See Network bandwidth.
E2 high-memory machine types
E2 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 | Maximum egress bandwidth (Gbps)3 |
---|---|---|---|---|---|---|
e2-highmem-2 |
2 | 16 | 128 | 257 | No | 4 |
e2-highmem-4 |
4 | 32 | 128 | 257 | No | 8 |
e2-highmem-8 |
8 | 64 | 128 | 257 | No | 16 |
e2-highmem-16 |
16 | 128 | 128 | 257 | No | 16 |
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.
3Maximum egress bandwidth cannot exceed the number given. Actual
egress bandwidth depends on the destination IP address and other factors.
See Network bandwidth.
E2 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 | Maximum egress bandwidth (Gbps)3 |
---|---|---|---|---|---|---|
e2-highcpu-2 |
2 | 2 | 128 | 257 | No | 4 |
e2-highcpu-4 |
4 | 4 | 128 | 257 | No | 8 |
e2-highcpu-8 |
8 | 8 | 128 | 257 | No | 16 |
e2-highcpu-16 |
16 | 16 | 128 | 257 | No | 16 |
e2-highcpu-32 |
32 | 32 | 128 | 257 | No | 16 |
N2 machine types
N2 machine types are the second 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 in predefined and custom machine types.
- 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 than 8 GB of memory 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 | Maximum egress 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.
3Maximum egress bandwidth cannot exceed the number given. Actual
egress bandwidth depends on the destination IP address and other factors.
See Network bandwidth.
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 | Maximum egress 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.
3Maximum egress bandwidth cannot exceed the number given. Actual
egress bandwidth depends on the destination IP address and other factors.
See Network bandwidth.
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 | Maximum egress 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.
3Maximum egress bandwidth cannot exceed the number given. Actual
egress bandwidth depends on the destination IP address and other factors.
See Network bandwidth.
N2D machine types
N2D machine types run on the second generation AMD EPYC Rome processor. They are the largest general-purpose machine type with up to 224 vCPUs and 896 GB of memory. N2D VMs support vCPU to memory ratios of 1:1, 1:4, and 1:8 with the option to customize your machine to your workload needs. N2D machine types run on AMD EPYC Rome processors with a base frequency of 2.25 GHz, an effective frequency of 2.7 GHz, and a max boost frequency of 3.3 GHz.
In summary, N2D machine types:
- Support up to 224 vCPUs and 896 GB of memory.
- Are available in predefined and custom machine types.
- Offer higher memory-to-core ratios for VMs created with the extended memory feature. Using the extended memory feature helps you avoid per-CPU software licensing costs while providing access to more than 8 GB of memory per vCPU.
- Are powered by the second generation AMD EPYC Rome processor.
- Support committed use and sustained use discounts.
N2D machine types are only available in select regions and zones.
N2D standard machine types
Machine name | vCPUs1 | Memory (GB) | Max number of persistent disks (PDs)2 | Max total PD size (TB) | Local SSD | Maximum egress bandwidth (Gbps)3 |
---|---|---|---|---|---|---|
n2d-standard-2 |
2 | 8 | 128 | 257 | Yes | 10 |
n2d-standard-4 |
4 | 16 | 128 | 257 | Yes | 10 |
n2d-standard-8 |
8 | 32 | 128 | 257 | Yes | 16 |
n2d-standard-16 |
16 | 64 | 128 | 257 | Yes | 32 |
n2d-standard-32 |
32 | 128 | 128 | 257 | Yes | 32 |
n2d-standard-48 |
48 | 192 | 128 | 257 | Yes | 32 |
n2d-standard-64 |
64 | 256 | 128 | 257 | Yes | 32 |
n2d-standard-80 |
80 | 320 | 128 | 257 | Yes | 32 |
n2d-standard-96 |
96 | 384 | 128 | 257 | Yes | 32 |
n2d-standard-128 |
128 | 512 | 128 | 257 | Yes | 32 |
n2d-standard-224 |
224 | 896 | 128 | 257 | Yes | 32 |
N2D high-memory machine types
Machine name | vCPUs1 | Memory (GB) | Max number of persistent disks (PDs)2 | Max total PD size (TB) | Local SSD | Maximum egress bandwidth (Gbps)3 |
---|---|---|---|---|---|---|
n2d-highmem-2 |
2 | 16 | 128 | 257 | Yes | 10 |
n2d-highmem-4 |
4 | 32 | 128 | 257 | Yes | 10 |
n2d-highmem-8 |
8 | 64 | 128 | 257 | Yes | 16 |
n2d-highmem-16 |
16 | 128 | 128 | 257 | Yes | 32 |
n2d-highmem-32 |
32 | 256 | 128 | 257 | Yes | 32 |
n2d-highmem-48 |
48 | 384 | 128 | 257 | Yes | 32 |
n2d-highmem-64 |
64 | 512 | 128 | 257 | Yes | 32 |
n2d-highmem-80 |
80 | 640 | 128 | 257 | Yes | 32 |
n2d-highmem-96 |
96 | 768 | 128 | 257 | Yes | 32 |
N2D high-CPU machine types
Machine name | vCPUs1 | Memory (GB) | Max number of persistent disks (PDs)2 | Max total PD size (TB) | Local SSD | Maximum egress bandwidth (Gbps)3 |
---|---|---|---|---|---|---|
n2d-highcpu-2 |
2 | 2 | 128 | 257 | Yes | 10 |
n2d-highcpu-4 |
4 | 4 | 128 | 257 | Yes | 10 |
n2d-highcpu-8 |
8 | 8 | 128 | 257 | Yes | 16 |
n2d-highcpu-16 |
16 | 16 | 128 | 257 | Yes | 32 |
n2d-highcpu-32 |
32 | 32 | 128 | 257 | Yes | 32 |
n2d-highcpu-48 |
48 | 48 | 128 | 257 | Yes | 32 |
n2d-highcpu-64 |
64 | 64 | 128 | 257 | Yes | 32 |
n2d-highcpu-80 |
80 | 80 | 128 | 257 | Yes | 32 |
n2d-highcpu-96 |
96 | 96 | 128 | 257 | Yes | 32 |
n2d-highcpu-128 |
128 | 128 | 128 | 257 | Yes | 32 |
n2d-highcpu-224 |
224 | 224 | 128 | 257 | Yes | 32 |
N1 machine types
N1 machine types are Compute Engine's first generation general-purpose machine types. The N1 machines are available on Skylake, Broadwell, Haswell, Sandy Bridge, and Ivy 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.
- Support Tensor Processing Units (TPUs) in select zones.
- Can support up to 8 virtual interfaces per instance.
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 | Maximum egress 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.
3Maximum egress bandwidth cannot exceed the number given. Actual
egress bandwidth depends on the destination IP address and other factors.
See Network bandwidth.
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 | Maximum egress 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.
3Maximum egress bandwidth cannot exceed the number given. Actual
egress bandwidth depends on the destination IP address and other factors.
See Network bandwidth.
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 | Maximum egress 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.
3Maximum egress bandwidth cannot exceed the number given. Actual
egress bandwidth depends on the destination IP address and other factors.
See Network bandwidth.
432 Gbps for Skylake or later CPU platforms. 16 Gbps for
all other platforms.
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 limitations in the amount of memory and vCPUs you can select.
When creating a custom machine type, you can choose between a custom machine type from the E2, N2, or N1 machine types. Custom machine types are subject to the same persistent disk limits as the E2 predefined machine types, N2 predefined machine types, or N1 predefined machine types. Currently, the max total persistent disk size for each machine type per instance is 257 TB and the max number of persistent disks is 128.
For more information, see Creating a VM instance with a custom machine type.
E2 custom machine types
E2 machine types support predefined platforms with Intel or AMD EPYC Rome processors. You can create E2 custom machine types with vCPUs in multiples of 2, up to 32 vCPUs. The minimum number of acceptable vCPUs is 2.
By default, the memory per vCPU that you can select for a custom machine type is determined by the machine type family. For E2 machine types, select 0.5 GB to 8 GB per vCPU, inclusive.
N2 custom machine types
For N2 machine types, which only support the Cascade Lake platform, you can create custom machine types with 2 to 80 vCPUs. You can create N2 custom machine types in multiples of 2, up to 30 vCPUs. For machine types with 32 vCPUs and more, you must select a vCPU count that is a multiple of 4. So, for example, 32, 36, and 40 vCPUs are all valid, but 38 is invalid. The minimum number of acceptable vCPUs is 2.
By default, the memory per vCPU that you can select for a custom machine type is determined by the machine type family. For N2 machine types, select between 0.5 GB and 8.0 GB per vCPU, inclusive. Higher amounts of memory are possible by enabling extended memory.
N2 machines are only available in select zones. To learn more, read the regions and zones page.
N2D custom machine types
The maximum number of vCPUs allowed for a custom machine type is determined by the machine type family you choose. For N2D machine types, which support the AMD EPYC Rome platform, you can deploy custom machine types with 2 to 96 vCPUs.
You can create N2D custom machines with 2, 4, 8, or 16 vCPUs. After 16, you can increment the number of vCPUs by 16, up to 96 vCPUs. The minimum acceptable number of vCPUs is 2.
By default, the memory per vCPU that you can select for a custom machine type is determined by the machine type family. For N2D machine types, select between 0.5 GB and 8.0 GB per vCPU, inclusive. Higher amounts of memory are possible by enabling extended memory.
N2D machines are only available in select zones. To learn more, read the regions and zones page.
N1 custom machine types
The maximum number of vCPUs allowed for a custom machine type is determined by the machine type family you choose. For N1 machine types:
- If you deploy in a zone that supports the Skylake CPU platform, you can create custom machine types with up to 96 vCPUs.
- If you deploy in zones that support the Broadwell, Haswell, or Ivy Bridge CPU platforms, you can deploy custom machine types with up to 64 vCPUs.
To see which platforms are available in each zone, read the regions and zones table.
You can create N1 machine types with 1 or more vCPUs. Above 1 vCPU, you must increment the number of vCPUs by 2, up to 96 vCPUs for Skylake platform, or up to 64 vCPUs for Broadwell, Haswell, or Ivy Bridge CPU platforms.
By default, the memory per vCPU that you can select for a custom machine type is determined by the machine type family. For N1 machine types, select between 0.9 GB and 6.5 GB per vCPU, inclusive. Higher amounts of memory are possible by enabling extended memory.
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:
- You cannot use regional persistent disks with compute-optimized machine types.
- C2 machine types are subject to different disk limits than general-purpose and memory-optimized machine types.
- C2 machine types are only available in select zones and regions.
- C2 machine types are only available on select CPU platforms.
Machine name | vCPUs1 | Memory (GB) | Max number of persistent disks (PDs)2 | Max total PD size (TB) | Local SSD | Maximum egress 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.
3Maximum egress bandwidth cannot exceed the number given. Actual
egress bandwidth depends on the destination IP address and other factors.
See Network bandwidth.
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, etc.
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:
- You cannot use regional persistent disks with memory-optimized machine types.
- Memory-optimized machine types are only available in specific zones. For more
information, see
Regions and Zones.
- M2 ultramem is only available on the Cascade Lake platform
- M1 megamem is available on the Skylake platform
- M1 ultramem is only available on the Broadwell E7 platform
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 | Maximum egress bandwidth (Gbps)3 |
---|---|---|---|---|---|---|
m2-ultramem-208 4 |
208 | 5,888 | 128 | 257 | No | 325 |
m2-ultramem-416 4 |
416 | 11,776 | 128 | 257 | No | 325 |
m2-megamem-416 4 |
416 | 5,888 | 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.
3Maximum egress bandwidth cannot exceed the number given. Actual
egress bandwidth depends on the destination IP address and other factors.
See Network bandwidth.
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 Cascade Lake or later CPU platforms. 16 Gbps for
all other platforms.
M1 machine types
M1 machine types are the first generation memory-optimized machine types that
offer 15 to 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 | Maximum egress 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 | Maximum egress bandwidth (Gbps)3 |
m1-megamem-96 |
96 | 1433.6 | 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.
3Maximum egress bandwidth cannot exceed the number given. Actual
egress bandwidth depends on the destination IP address and other factors.
See Network bandwidth.
Accelerator-optimized machine type family
Accelerator-optimized (A2) VMs featuring NVIDIA's new Ampere A100 GPUs are a new machine type family available on Compute Engine that are optimized for massively parallelized CUDA compute workloads, such as machine learning (ML) and high performance computing (HPC).
Each A2 VM has a fixed number of A100 GPUs that offers up to 10x improvements in computing speed when compared to previous generation NVIDIA V100 GPUs.
In summary, A2 VMs provide the following features:
- Industry-leading NVLink scale that provides peak GPU to GPU NVLink bandwidth of 600 Gbps. For example, systems with 16 GPUs have an aggregate NVLink bandwidth of up to 9.6 Terabytes per second. These 16 GPUs can be used as a single high performance accelerator with unified memory space to deliver up to 10 petaFLOPS of compute power and up to 20 petaFLOPS of inference compute power that can be used for artificial intelligence, deep learning, and machine learning workloads.
- Next generation NVIDIA A100 GPUs. A100 GPU provides 40 GB of GPU memory—ideal for large language models, databases, and HPC.
- High performance network bandwidth of up to 100 Gbps.
- Virtualization optimizations.
- Optional local SSD support—you can get up to 3 TB of Local SSD with A2 VMs. This can be used as fast scratch disks or for feeding data into the A100 GPUs while preventing I/O bottlenecks.
A2 machine types
Machine name | vCPUs1 | Memory (GB) | Max number of persistent disks (PDs)2 | Max total PD size (TB) | Local SSD | Maximum egress bandwidth (Gbps)3 |
---|---|---|---|---|---|---|
a2-highgpu-1g |
12 | 85 | 128 | 257 | Yes | 24 |
a2-highgpu-2g |
24 | 170 | 128 | 257 | Yes | 32 |
a2-highgpu-4g |
48 | 340 | 128 | 257 | Yes | 50 |
a2-highgpu-8g |
96 | 680 | 128 | 257 | Yes | 100 |
a2-megagpu-16g |
96 | 1360 | 128 | 257 | Yes | 100 |
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.
3Maximum egress bandwidth cannot exceed the number given. Actual
egress bandwidth depends on the destination IP address and other factors.
See Network bandwidth.
Shared-core machine types
Shared-core machine types use context-switching to share a physical core between vCPUs for the purpose of multitasking. Different shared-core machine types sustain different amounts of time on a physical core. Review the following sections to learn more.
In general, 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
Shared-core 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
, g1-small
, and e2 shared-core
machine types.
E2 shared-core machine types
E2 shared-core machines are cost-effective, have a virtio memory balloon device, and are ideal for small workloads. When you use E2 shared-core machine types, your VM runs two vCPUs simultaneously, shared on one physical core, for a specific fraction of time, depending on the machine type.
e2-micro
sustains 2 vCPUs, each for 12.5% of CPU time, totaling 25% vCPU time.e2-small
sustains 2 vCPUs, each at 25% of CPU time, totaling 50% of vCPU time.e2-medium
sustains 2 vCPUs, each at 50% of CPU time, totaling 100% vCPU time.
Each vCPU can burst up to 100% of CPU time, for short periods, before returning to the time limitations above.
Machine name | Description | vCPUs | Fractional vCPUs1 | Memory (GB) | Max number of persistent disks (PDs)2 | Max total PD size (TB) | Local SSD | Maximum egress bandwidth (Gbps)3 |
---|---|---|---|---|---|---|---|---|
e2-micro |
Micro machine type with 0.25 vCPU and 1 GB of memory, backed by a shared physical core. | 2 | 0.251 | 1 | 16 | 3 | no | 1 |
e2-small |
Small machine type with 0.5 vCPU and 2 GB of memory, backed by a shared physical core. | 2 | 0.51 | 2 | 16 | 3 | no | 1 |
e2-medium |
Medium machine type with 1 vCPU and 4 GB of memory, backed by a shared physical core. | 2 | 11 | 4 | 16 | 3 | no | 2 |
2Persistent disk usage is charged separately from machine type pricing.
3Maximum egress bandwidth cannot exceed the number given. Actual egress bandwidth depends on the destination IP address and other factors. See Network bandwidth.
N1 shared-core machine types
N1 machine types have one vCPU on a physical core available for short periods of time.
- When you run an
f1-micro
machine type, your VM sustains a single vCPU for up to 20% of CPU time. - When you run a
g1-small
machine type, your VM sustains a single vCPU for up to 50% of CPU time.
Each vCPU can burst up to 100% of CPU time, for short periods, before returning to the time limitations above.
Machine name | Description | vCPUs | Fractional vCPUs1 | Memory (GB) | Max number of persistent disks (PDs)2 | Max total PD size (TB) | Local SSD | Maximum egress bandwidth (Gbps)3 |
---|---|---|---|---|---|---|---|---|
f1-micro |
Micro machine type with 0.2 vCPU and 0.6 GB of memory, backed by a shared physical core. | 1 | 0.21 | 0.60 | 16 | 3 | No | 1 |
g1-small |
Small machine type with 0.5 vCPU and 1.70 GB of memory, backed by a shared physical core. | 1 | 0.51 | 1.70 | 16 | 3 | No | 1 |
2Persistent disk usage is charged separately from machine type pricing.
3Maximum egress bandwidth cannot exceed the number given. Actual egress bandwidth depends on the destination IP address and other factors. See Network bandwidth.
GPUs and machine types
You can attach GPUs to general-purpose N1 machine types or accelerator-optimized A2 machine types only. GPUs are not supported for other machine types.
VMs with lower numbers of GPUs are limited to a maximum number of vCPUs. In general, a higher number of GPUs lets you create instances with a higher number of vCPUs and memory. For more information, see GPUs on Compute Engine.
Virtio memory balloon device
Compute Engine E2 VM instances that are based on a public image have a virtio memory balloon device , which monitors the guest operating system's memory use. The guest operating system communicates its available memory to the host system. The host reallocates any unused memory to other processes on-demand, thereby using memory more effectively. Compute Engine collects and uses this data to make more accurate rightsizing recommendations.
Verifying the driver installation
To check if your image has the virtio memory balloon device driver installed and loaded, run the following command.
Linux
Most Linux distributions include the virtio memory balloon device driver. To verify that your image has the driver installed and loaded, run:
sudo modinfo virtio_balloon > /dev/null && echo Balloon driver is \ installed || echo Balloon driver is not installed; sudo lsmod | grep \ virtio_balloon > /dev/null && echo Balloon driver is loaded || echo \ Balloon driver is not loaded
In Linux kernels before 5.2, the Linux memory system sometimes mistakenly
prevents large allocations when the balloon device is present. This is
rarely an issue in practice, but we recommend changing the
virtual memory overcommit-accounting setting to 1
to prevent the issue
from occurring. This change is already made by default in Google-provided
Debian, CentOS, and RHEL images published since December 10, 2019,
and all Container-optimized images (COS).
To fix the setting, run the following command:
sudo /sbin/sysctl -w vm.overcommit_memory=1
This changes the setting from 0
to 1
.
To persist this change across reboots, add the following:
vm.overcommit_memory=1to your
/etc/sysctl.conf
file.Windows
Compute Engine Windows images include the virtio balloon device. However, custom Windows images do not. To verify whether your Windows image has the driver installed, run:
googet verify google-compute-engine-driver-balloon
Disabling the virtio memory balloon device
You can opt-out of the virtio memory balloon device by disabling the device driver. After disabling the virtio memory balloon device, you will continue to receive rightsizing recommendations; however, they might not be as accurate.
Linux
To disable the device in Linux, run the following command:
sudo rmmod virtio_balloon
You can add this command to the VM's startup script to automatically disable the device upon VM boot.
Windows
To disable the device on Windows, run the following command:
googet -noconfirm remove google-compute-engine-driver-balloon
You can put this command into the VM's startup script to automatically disable the device upon VM boot.
Dynamic resource management
E2 VMs put an emphasis on performance and are designed to protect your workloads from the type of issues associated with over-subscription, thanks to Google's custom-built CPU scheduler and performance-aware live migration. E2 VMs, including shared-core instances, support dynamic resource management for instances up to 32 vCPUs and 128 GB of memory.
What's next
- Network bandwidth
- Virtual machine instances
- GPUs on Compute Engine
- Images
- Creating and starting a VM instance
- Quickstart using a Linux VM
- Quickstart using a Windows VM