Stay organized with collections Save and categorize content based on your preferences.

Custom machine types

Create Compute Engine VMs with optimal amounts of vCPU and memory.

View documentation for this product.

Custom Machine Types Overview logo

Tailor your Compute Engine instances

Custom machine types is a feature of Compute Engine that lets you easily create a machine type customized to your needs. With custom machine types, you can create virtual machines with the optimal amount of CPU and memory for your workloads. Create a machine type with as little as 1 vCPU and up to 96 vCPUs, or any even number of vCPUs in between. You can configure up to 8.0 GB of memory per vCPU.
Tailored, configurable infrastructure logo

Tailored, configurable infrastructure

By offering custom machine types and predefined machine types, Compute Engine allows you to tailor your infrastructure to your workload. And you aren’t locked in to your choice. Compute Engine’s stop/start feature allows you move your workload to a smaller or larger custom machine type instance, or to a predefined configuration.

Find your optimal pricing logo

Find your optimal pricing

Custom machine types are priced by the resources they use (i.e. vCPU, memory). You can predictably calculate the cost of custom machine type shapes in any configuration. Optimize your Compute Engine pricing by adding or subtracting resources above or below the next predefined machine type. For some use cases, you could save 50% or more compared to predefined types at other public cloud providers by configuring an optimal machine for your workload on Google Cloud.

Enable it instantly logo

Enable it instantly

Create VMs with custom machine types using the Compute Engine UI, a simple gcloud command line invocation, or the API.

gcloud compute instances create my-vm --custom-cpu 4 --custom-memory 5 


Programmatic access

Supported by the gcloud command line tool and through our API. It’s as easy as --custom-cpu {VCPUS} --custom-memory {MEMORY}.

Console configuration

In the create instance page, use the customize option and build a virtual machine to fit your needs.

OS support

CentOS, CoreOS, Debian, OpenSUSE, Red Hat, SLES, Ubuntu, and Windows. Or bring your own Linux variant.

Familiar capabilities

As a feature of Compute Engine, custom machine types offer all the same capabilities as predefined machine types. If you already use Compute Engine, you will find custom machine types very familiar.

Predictable pricing

Custom machine types are priced based on hourly usage per vCPUs and per GB of memory. A 8 vCPU 20 GB memory VM costs twice as much as a 4 vCPU 10 GB memory VM.

Automatic discounts

With sustained use discounts, we automatically give you discounted prices for long-running workloads with no sign-up fees or up-front commitment.

Commitment savings

With committed use discounts you can save up to 57% with no up-front costs or instance-type lock in.

Preemptible and custom

For batch jobs and other fault-tolerant workloads, you can customize and save more by making your custom machines Preemptible VMs.

Forbes logo

"The true value of cloud is realized when customers can scale their workloads horizontally and vertically. Custom machine types put the control in the hands of customers by letting them choose what they need."

Janakiram MSV, Contributor, Forbes Magazine


Custom machine types are billed per vCPUs memory provisioned to each instance.

Sustained use discounts

Compute Engine calculates custom machine type sustained use discounts based on vCPU and memory usage, and applies the discounts described by the sustained usage discount table.

Preemptible custom machine types

Preemptible VMs can save you up to 80% on Compute Engine costs for batch jobs and fault-tolerant workloads. You can combine preemptibility with custom machine types.

How much could you save with custom machine types?

Let’s say you are running a web server on a cloud provider that offers pre-defined virtual machines with 2 vCPUs and 7.5 GB of RAM and—for twice the cost—4 vCPUs and 15 GB of RAM. If your website would run best on VMs with 4 vCPUs and 8 GB of RAM, you could create custom machine types on Compute Engine and save 33% over your previous provider. You would also get the benefits of running your website on Google, such as automatic sustained use discounts, which can help you save 53% over your previous provider.

US region pricing

Item US Region Hourly Price (billed per second) With sustained use discount at 100% usage When configured as a preemptible VM
vCPU $0.033174 / vCPU $0.023228 / vCPU $0.00698 / vCPU
Memory $0.004446 / GB $0.003112 / GB $0.00094 / GB

Take the next step

Start building on Google Cloud with $300 in free credits and 20+ always free products.

Need help getting started?
Work with a trusted partner
Continue browsing

Take the next step

Start your next project, explore interactive tutorials, and manage your account.

Need help getting started?
Work with a trusted partner
Get tips & best practices