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 into different families, curated for different workloads. Currently, 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 from each of the machine type families. 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 will apply.

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

Machine type families

Machine types are divided into machine type families, which are curated for specific workload types. Currently, the following are the primary machine type families 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 offer up to 96 vCPUs and 6.5 GB of memory per vCPU and are available on Intel Sandy Bridge, Broadwell, Haswell, Ivy Bridge, and Skylake CPU platforms.

  • Compute-optimized machine types: Compute-optimized machine types offer the highest performance per core on Google Compute Engine and are optimized for compute-intensive workloads. These machine types offer Intel Scalable Processors (Cascade Lake) and up to 3.8Ghz 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 4TB 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? Processors
General-purpose 0.95 - 6.5 GB 1 - 96 Yes Yes
  • Skylake
  • Broadwell E5
  • Haswell
  • Ivy Bridge
  • Sandy Bridge
Compute-optimized 4 GB 4 - 60 No Yes
  • Cascade Lake
Memory-optimized 14 GB 40 - 96 No Yes
  • Broadwell E7
Shared-core 0.60 GB 0.2 - 0.5 No No
  • N/A

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 all of the N1 machine types.

N1 machine types

N1 machine types offer:

The following is a list available N1 predefined machine types.

N1 standard machine types

Machine name Description vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB)
n1-standard-1 Standard machine type with 1 vCPU and 3.75 GB of memory. 1 3.75 128 64
n1-standard-2 Standard machine type with 2 vCPUs and 7.5 GB of memory. 2 7.50 128 64
n1-standard-4 Standard machine type with 4 vCPUs and 15 GB of memory. 4 15 128 64
n1-standard-8 Standard machine type with 8 vCPUs and 30 GB of memory. 8 30 128 64
n1-standard-16 Standard machine type with 16 vCPUs and 60 GB of memory. 16 60 128 64
n1-standard-32 Standard machine type with 32 vCPUs and 120 GB of memory. 32 120 128 64
n1-standard-64 Standard machine type with 64 vCPUs and 240 GB of memory. 64 240 128 64
n1-standard-96 Standard machine type with 96 vCPUs and 360 GB of memory. 96 360 128 64

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.

N1 high-memory machine types

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

Machine Name Description vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB)
n1-highmem-2 High memory machine type with 2 vCPUs and 13 GB of memory. 2 13 128 64
n1-highmem-4 High memory machine type with 4 vCPUs, and 26 GB of memory. 4 26 128 64
n1-highmem-8 High memory machine type with 8 vCPUs and 52 GB of memory. 8 52 128 64
n1-highmem-16 High memory machine type with 16 vCPUs and 104 GB of memory. 16 104 128 64
n1-highmem-32 High memory machine type with 32 vCPUs and 208 GB of memory. 32 208 128 64
n1-highmem-64 High memory machine type with 64 vCPUs and 416 GB of memory. 64 416 128 64
n1-highmem-96 High memory machine type with 96 vCPUs and 624 GB of memory. 96 624 128 64

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.

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 Description vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB)
n1-highcpu-2 High-CPU machine type with 2 vCPUs and 1.80 GB of memory. 2 1.80 128 64
n1-highcpu-4 High-CPU machine type with 4 vCPUs and 3.60 GB of memory. 4 3.60 128 64
n1-highcpu-8 High-CPU machine type with 8 vCPUs and 7.20 GB of memory. 8 7.20 128 64
n1-highcpu-16 High-CPU machine type with 16 vCPUs and 14.4 GB of memory. 16 14.4 128 64
n1-highcpu-32 High-CPU machine type with 32 vCPUs and 28.8 GB of memory. 32 28.8 128 64
n1-highcpu-64 High-CPU machine type with 64 vCPUs and 57.6 GB of memory. 64 57.6 128 64
n1-highcpu-96 High-CPU machine type with 96 vCPUs and 86.4 GB of memory. 96 86.4 128 64

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.

Custom machine types

If none of the 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. Read Creating an Instance with a Custom Machine Type for all the details.

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 machines 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 more.

Memory-optimized machine types are only available as predefined machine types and include the n1-ultramem and n1-megamem machine types. These machine types offer at least 14 GB of 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. See Regions and Zones to find where memory-optimized machine types are available.
Machine name Description vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB) Local SSD
n1-ultramem-40 Memory-optimized machine type with 40 vCPUs and 961GB of memory. 40 961 128 64 No
n1-ultramem-80 Memory-optimized machine type with 80 vCPUs and 1.87 TB of memory. 80 1922 128 64 No
n1-ultramem-160 Memory-optimized machine type with 160 vCPUs and 3.75 TB of memory. 160 3844 128 64 No
Machine name Description vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB) Local SSD
n1-megamem-96 Memory-optimized machine type with 96 vCPUs and 1.4 TB of memory. 96 1433.6 128 64 Yes

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.

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 Google 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.8Ghz sustained all-core turbo, and provide full transparency into the architecture of the underlying server platforms enabling advanced performance tuning. 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 the following regions and zones during Beta:
    • us-central1-b
    • us-central1-c
    • europe-west4-b
    • europe-west4-c
Machine name Description vCPUs1 Memory (GB) Max number of persistent disks (PDs)2 Max total PD size (TB)
c2-standard-4 C2 machine type with 4 vCPUs and 16 GB of memory. 4 16 128 64
c2-standard-8 C2 machine type with 8 vCPUs and 32 GB of memory. 8 32 128 64
c2-standard-16 C2 machine type with 16 vCPUs and 64 GB of memory. 16 64 128 64
c2-standard-30 C2 machine type with 30 vCPUs and 120 GB of memory. 30 120 128 64
c2-standard-60 C2 machine type with 60 vCPUs and 240 GB of memory. 60 240 128 64

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.

Machine name Description vCPUs Memory (GB) Max number of persistent disks (PDs)1 Max total PD size (TB)
f1-micro Micro machine type with 0.2 vCPU, 0.60 GB of memory, backed by a shared physical core. 0.2 0.60 16 3
g1-small Shared-core machine type with 0.5 vCPU, 1.70 GB of memory, backed by a shared physical core. 0.5 1.70 16 3

1Persistent disk usage is charged separately from machine type pricing.

GPUs and machine types

You can attach GPUs only to instances with a predefined machine type or custom machine type that you are able to create in a zone. GPUs are not supported on shared-core machine types or memory-optimized 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. See GPUs on Compute Engine for details.

What's next

หน้านี้มีประโยชน์ไหม โปรดแสดงความคิดเห็น