VM instances pricing

This page describes the cost of running a Compute Engine VM instance with any of the following machine types, as well as other VM instance-related pricing. To see the pricing for other Google Cloud Platform products, see the GCP pricing list.

Compute Engine charges for usage based on the following price sheet. A bill is sent out at the end of each billing cycle, listing previous usage and charges. Prices on this page are listed in U.S. dollars (USD).

For Compute Engine, disk size, machine type memory, and network usage are calculated in gigabytes (GB), where 1 GB is 230 bytes. This unit of measurement is also known as a gibibyte (GiB).

If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.

You can also find pricing information with the following options:

Billing model

The following billing model applies to all vCPUs, GPUs, and memory resources. The billing model also applies to several premium images that you run on Compute Engine instances.

  1. All vCPUs, GPUs, and GB of memory are charged a minimum of 1 minute. For example, if you run your virtual machine for 30 seconds, you will be billed for 1 minute of usage.

  2. After 1 minute, instances are charged in 1 second increments.

Instance uptime

Instance uptime is measured as the number of seconds between when you start an instance and when you stop an instance, the latter being when the instance state is TERMINATED. In some cases, your instance can suffer from a failure and be marked as TERMINATED by the system; in these cases, you will not be charged for usage after the instance reaches the TERMINATED state. If an instance is idle, but still has a state of RUNNING, it will be charged for instance uptime. The easiest way to determine the status of an instance is to use gcloud compute with the gcloud compute instances list command or to visit the Google Cloud Console.

In the case of reservations, instance uptime is measured as the number of seconds between when you create a reservation and when you delete that reservation. Reserved resources are billed at standard rates, whether they are started or not.

Note that Compute Engine bills for a minimum of 1 minute of usage, so if you use an instance for 30 seconds of uptime, you are billed for 1 minute. After 1 minute, your instance is billed on a per-second basis. For more information, see the billing model.

Resource-based pricing

Each vCPU and each GB of memory on Compute Engine is billed separately rather than as part of a single machine type. You still create instances using predefined machine types, but your bill reports them as individual vCPUs and memory used per hour.

Resource-based pricing allows Compute Engine to apply sustained use discounts to all of your predefined machine type usage in a region collectively rather than to individual machine types.

vCPU and memory usage for each machine type can receive one of the following discounts:

Discount types cannot be combined. Preemptible VM instances cannot receive sustained use discounts or committed use discounts.

The following sections describe prices for machine types based on vCPU and memory resources, but also include the calculated cost for each machine type. You can also use the Google Cloud Pricing Calculator to better understand prices for different configurations.

General-purpose machine type family

General-purpose machine-types offer predefined and custom machine types in each region. Predefined machine types have a preset number of vCPUs and amount of memory, but are billed using the resource-based pricing model. Custom machine types are billed according to the resource-based pricing.

Compute Engine provides automatic sustained use discounts for all of the predefined vCPU and memory resources that you use in a region. Sustained use discounts for predefined machine types are calculated separately from custom, memory-optimized, compute-optimized, and shared-core machine types. Depending on the machine type, sustained use discounts differ between N1 and N2 machine types:

  • N1 machine types can receive a sustained use discount up to 30%.
  • N2 machine types can receive a sustained use discount up to 20%.

For more information, see Sustained use discounts.

Not all machine types are guaranteed to be available in all zones all the time. To ensure that a machine type is available when you need it, you can preemptively reserve the machine type in a certain zone. For information about reserving predefined machine types in a specific zone, see Reserving zonal resources.

N1 machine types

N1 standard machine types

The following tables show the calculated cost for standard predefined machine types in the N1 generation. The vCPUs and memory from each of these machine types are billed by their individual predefined vCPU and memory prices, but these tables provide the cost that you can expect using a specific machine type.

Standard machine types have 3.75 GB of memory per vCPU.

N1 high-memory machine types

The following tables show the calculated cost for the N1 high-memory predefined machine types. The vCPUs and memory from each of these machine types are billed by their individual predefined vCPU and memory prices, but these tables provide the cost that you can expect using a specific machine type.

High-memory machine types have 6.5 GB of memory per vCPU. High-memory instances are ideal for tasks that require more memory relative to virtual CPUs.

N1 high-CPU machine types

The following tables show the calculated cost for N1 high-CPU predefined machine types. The vCPUs and memory from each of these machine types are billed by their individual predefined vCPU and memory prices, but these tables provide the cost that you can expect using a specific machine type.

High-CPU machine types have one vCPU for every 0.90 GB of memory. High-CPU machine types are ideal for tasks that require moderate memory configurations for the needed vCPU count.

N1 custom vCPUs and memory

Custom machine types allow you to set a specific number of vCPUs and GB of memory for your instances to match the needs of your workload. Custom machine types save you the cost of running on a larger and more expensive machine type if your application does not require all of the resources provided by that machine type.

For example, instead of using an n1-standard-8 machine type when you need a machine type with 6 vCPUs, you can create an instance with a custom machine type that has 6 vCPUs and 22.5 GB of memory. Creating a custom machine type can save you up to 40% compared to selecting a larger machine type. Custom machine types are billed according to the number of vCPUs and the amount of memory used.

Read the Creating Instances with Custom Machine Types to learn how to use these machine types.

Sustained use discounts for custom machine types are calculated separately from predefined machine types, memory-optimized types, and shared-core machine types.

Not all machine types are guaranteed to be available in all zones all the time. To ensure that a machine type is available when you need it, you can preemptively reserve the machine type in a certain zone. For information about reserving predefined machine types in a specific zone, see Reserving zonal resources.

For an accurate estimate of your billing with custom machine types, use the Google Cloud Platform Pricing Calculator.

N1 extended custom memory

For custom machine types, any memory up to and including 6.5 GB of memory per vCPU is charged at the standard custom vCPU and memory pricing rate. Any memory above the 6.5 GB per vCPU is charged according to the extended memory prices that are described in detail below. See the Extended Memory page to learn how to create instances with custom machine types and extended memory.

N2 machine types

N2 standard machine types

The following tables show the calculated costs for standard predefined machine types in the N2 generation. The vCPUs and memory from each of these machine types are billed by their individual predefined vCPU and memory prices, but these tables provide the cost that you can expect using a specific machine type.

Standard machine types have 4 GB of memory per vCPU.

N2 high-memory machine types

The following tables show the calculated cost for the N2 high-memory predefined machine types. The vCPUs and memory from each of these machine types are billed by their individual predefined vCPU and memory prices, but these tables provide the cost that you can expect using a specific machine type.

High-memory machine types have 8 GB of memory per vCPU. High-memory instances are ideal for tasks that require more memory relative to virtual CPUs.

N2 high-CPU machine types

The following tables show the calculated cost for N2 high-CPU predefined machine types. The vCPUs and memory from each of these machine types are billed by their individual predefined vCPU and memory prices, but these tables provide the cost that you can expect using a specific machine type.

High-CPU machine types have one vCPU for every 1 GB of memory. High-CPU machine types are ideal for tasks that require moderate memory configurations for the needed vCPU count.

N2 custom vCPUs and memory

Custom machine types allow you to set a specific number of vCPUs and GB of memory for your instances to match the needs of your workload. Custom machine types save you the cost of running on a larger and more expensive machine type if your application does not require all of the resources provided by that machine type.

Read Creating a VM instance with a custom machine type to learn how to use these machine types.

Sustained use discounts for custom machine types are calculated separately from predefined machine types, memory-optimized types, and shared-core machine types.

Not all machine types are guaranteed to be available in all zones all the time. To ensure that a machine type is available when you need it, you can preemptively reserve the machine type in a certain zone. For information about reserving predefined machine types in a specific zone, see Reserving zonal resources.

For an accurate estimate of your billing with custom machine types, use the Google Cloud Platform Pricing Calculator.

N2 extended custom memory

For custom machine types, any memory up to and including 8 GB of memory per vCPU is charged at the standard custom vCPU and memory pricing rate. Any memory above 8 GB per vCPU is charged according to the following extended memory prices. To learn how to create instances with custom machine types and extended memory, see Adding extended memory to a 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 general-purpose n1-highmem machine types. Memory-optimized machine types are available in certain regions only. See the Machine Types page to learn more about memory-optimized machine types.

Sustained use discounts for memory-optimized machine types are calculated separately from general-purpose machine types, custom machine types, and shared-core machine types.

Not all machine types are guaranteed to be available in all zones all the time. To ensure that a machine type is available when you need it, you can preemptively reserve the machine type in a certain zone. For information about reserving predefined machine types in a specific zone, see Reserving zonal resources.

M1 machine types

m1-ultramem and m1-megamem machine types have greater than 14 GB of memory per vCPU. The following describes the pricing per vCPU and GB of memory of these machine types.

The following table shows the calculated cost for m1-megamem and m1-ultramem machine types. The vCPUs and memory from each of these machine types are billed by their individual memory-optimized vCPUs and memory prices but these tables provide the cost that you can expect using a specific machine type.

These machine types are only available in select zones.

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. To use these machine types, you must request quota using one of the following options:

  • Request access to evaluation quota so that you can test the performance of these machine types. Any VMs you create with these machine types count against the evaluation quota and are billed using the evaluative prices listed below. Evaluation quota persists only for a limited amount of time on your project.
  • Purchase a 1 year or 3 year commitment for sustained usage. Commitments are not billed incrementally. Commitments bill you a monthly fee for the duration of your commitment term even if you do not use any of the committed resources.

These machine types are only available in select zones.

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.

C2 machine types

C2 machine types offer Intel Scalable Processors (Cascade Lake) and up to 3.8Ghz sustained all-core-turbo. Currently, C2 machine types are only available in certain regions and zones. The following table describes the pricing per vCPU and GB of memory for C2 machine types.

The following table shows the calculated cost for c2-standard machine types, which are C2 predefined machine types. The vCPUs and memory from each of these machine types are billed by their individual compute-optimized vCPUs and memory prices but these tables provide the cost that you can expect using a specific machine type.

Shared-core machine types

Compute Engine offers shared-core machine types, which are more cost-effective for running smaller applications that do not require as many resources as provided by the other machine types.

Unlike predefined machine types, custom machine types, and memory-optimized machine types, shared-core machine types are not billed on their individual resources. Each machine type has a defined price for both vCPUs and memory.

Sustained use discounts for shared-core machine types are calculated separately from predefined machine types, custom machine types, and memory-optimized 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.

Sustained use discounts

Sustained use discounts are calculated for each individual vCPU and GB of memory that you use. When you use a vCPU or a GB of memory for more than 25% of a month, Compute Engine automatically gives you a discount for every incremental second that you continue to use those resources. The discount increases with usage and you can get up to a 30% net discount off of the vCPU and memory cost for instances that run the entire month.

Additionally, vCPU and memory usage in each region is calculated separately for each of the following categories:

For example, if you use predefined machine types, custom machine types, and memory-optimized machine types in us-west1, Compute Engine calculates the sustained use discount for each of those categories separately. Other regions are also calculated separately from us-west1 resources.

Sustained use discounts are applied automatically and will be calculated and added to your bill as your project earns them. There is no action needed on your part to enable sustained use discounts.

To learn more about sustained use discounts, see the Sustained Use Discounts documentation.

Committed use discounts

Compute Engine offers the ability to purchase a committed use contract in return for heavily discounted prices for VM usage. These discounts are known as committed use discounts. Read the purchasing a commitment page to learn how to create a commitment.

Committed use discounts are available in the following categories:

  • General purpose: Committed use discounts for standard, highmem, highcpu, custom machine types, and general purpose sole-tenant nodes, with or without GPUs and local SSDs.
  • Memory-optimized: Committed use discounts for memory-optimized machine types.
  • Compute-optimized: Committed use discounts for compute-optimized machine types.

Commitments are appropriate for predictable and steady state usage where you will use a specific amount of vCPUs and memory for future workloads. Commitments allow you to purchase a specific number of vCPUs and amount of memory at up to a 57% discount over full prices for most machine types or custom machine types. The discount is up to 70% for memory-optimized machine types. You commit to the entire usage term and are billed for each month regardless of whether usage has occurred.

To see vCPU and memory pricing for 1 and 3 year commitments compared with other Compute Engine pricing options, see the resource pricing tables.

Combining commitments with reservations

A Committed Use Discount provides a 1- or 3-year discounted price agreement, but it does not reserve capacity in a specific zone. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. By combining a reservation with a commitment, you get discounted, reserved resources.

See Purchasing a commitment with an attached reservation.

Simulated maintenance event pricing

Running simulated maintenance events incurs the following charges:

  • Simulated maintenance on instances configured for live migration incur costs for each of the following instance resources:
    • Price per vCPU on the instance, where f1-micro and g1-small are each equivalent to 1 vCPU: $0.040
    • Price per GB of memory: $0.010
    • Price per GB of local SSD space: $0.001
  • Simulated maintenance on preemptible VM instances: Free
  • Simulated maintenance on instances configured to terminate and restart: Free

Viewing usage

The Google Cloud Console provides a transaction history for each of your projects. This history describes your current balance and estimated resource usage for that particular project.

To view a project's transaction history, go to the estimated billing invoice page.

What's next?

Bu sayfayı yararlı buldunuz mu? Lütfen görüşünüzü bildirin:

Şunun hakkında geri bildirim gönderin...

Compute Engine Documentation