Stay organized with collections
Save and categorize content based on your preferences.
This page describes how you can increase vCPU for your builds.
By default, Cloud Build runs your builds on a standard virtual machine (VM).
In addition to the standard VM, Cloud Build provides
several high-CPU VM types
to run builds. To increase the speed of your build, select a machine
with a higher vCPU to run builds. Keep in mind that although selecting a high vCPU machine
increases your build speed, it may also increase the startup time of your build as
Cloud Build only starts non-standard machines on demand.
If you require more vCPU options than the ones provided by default pools,
you can choose to run your builds on private pools,
which provides a number of high-CPU machine types for builds.
To learn more about the all the available machine types, see the Pricing page.
Before you begin
To use the command-line examples in this guide, install and configure the
Google Cloud CLI.
If you've installed gcloud CLI previously, make sure you have the
latest available version by running gcloud components update.
Increase vCPU for default pools
You can increase the vCPU for running builds in a default pool either by passing
the value directly to the gcloud builds submit command or by specifying the
value in the build config file.
Pass the value directly to the gcloud builds submit command:
To specify a custom VM size directly in the gcloud builds submit command,
add the --machine-type argument to the command:
Select the project in which you created the private pool.
Click on the private pool name.
In the Edit private pool side panel, use the Machine type drop-down
to select a larger machine type.
Click Save.
gcloud
You can increase the vCPU for running builds in a private pool either by passing
the value directly to the gcloud builds worker-pools update command or by
specifying the value in the private pool config file.
Specify the value in the private pool config file:
Update the value of machineType field to one of the supported
machine types .
Run the following command, where PRIVATEPOOL_ID is
the unique identifier for your private pool, REGION
is the region where your private pool is located, and PRIVATEPOOL_CONFIG_FILE
is the name of your private pool config file:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eCloud Build allows you to increase the vCPU for your builds to enhance build speed by selecting a high-CPU virtual machine (VM).\u003c/p\u003e\n"],["\u003cp\u003eYou can increase vCPU for builds in default pools by using the \u003ccode\u003egcloud builds submit\u003c/code\u003e command with the \u003ccode\u003e--machine-type\u003c/code\u003e argument or by specifying the \u003ccode\u003emachineType\u003c/code\u003e field in the build config file.\u003c/p\u003e\n"],["\u003cp\u003eTo increase vCPU in private pools, you can use the \u003ccode\u003egcloud builds worker-pools update\u003c/code\u003e command or update the \u003ccode\u003emachineType\u003c/code\u003e field in the private pool config file.\u003c/p\u003e\n"],["\u003cp\u003eSelecting a high-vCPU machine can reduce build time, but may increase build startup time since non-standard machines are started on demand by Cloud Build.\u003c/p\u003e\n"],["\u003cp\u003eThe specific vCPU options available for both default and private pools can be found in the Cloud Build pricing page and the private pool configuration file schema, respectively.\u003c/p\u003e\n"]]],[],null,["# Increase vCPU for builds\n\nThis page describes how you can increase vCPU for your builds.\n\nBy default, Cloud Build runs your builds on a standard virtual machine (VM).\nIn addition to the standard VM, Cloud Build provides\n[several high-CPU VM types](/build/docs/api/reference/rest/v1/projects.builds#machinetype)\nto run builds. To increase the speed of your build, select a machine\nwith a higher vCPU to run builds. Keep in mind that although selecting a high vCPU machine\nincreases your build speed, it may also increase the startup time of your build as\nCloud Build only starts non-standard machines on demand.\n\nIf you require more vCPU options than the ones provided by default pools,\nyou can choose to run your builds on [private pools](/build/docs/private-pools/private-pools-overview),\nwhich provides a number of high-CPU machine types for builds.\n\nTo learn more about the all the available machine types, see the [Pricing page](/build/pricing).\n\nBefore you begin\n----------------\n\nTo use the command-line examples in this guide, install and configure the\n[Google Cloud CLI](/sdk/docs/install-sdk).\n\n- If you've installed gcloud CLI previously, make sure you have the latest available version by running `gcloud components update`.\n\nIncrease vCPU for default pools\n-------------------------------\n\nYou can increase the vCPU for running builds in a default pool either by passing\nthe value directly to the `gcloud builds submit` command or by specifying the\nvalue in the build config file.\n\n**Pass the value directly to the `gcloud builds submit` command:**\n\nTo specify a custom VM size directly in the `gcloud builds submit` command,\nadd the `--machine-type` argument to the command: \n\n gcloud builds submit --config=cloudbuild.yaml \\\n --machine-type=E2_HIGHCPU_8\n\n**Specify the value in the build config file:** \n\n### YAML\n\n1. Open your [build config file](/build/docs/build-config-file-schema).\n\n2. Update the [`machineType`](/build/docs/api/reference/rest/v1/projects.builds#machinetype)\n field to an enum value corresponding to one of the [supported machine types for default pools](/build/pricing).\n The following example shows how to add the `machineType` option to a\n build config file:\n\n steps:\n - name: 'gcr.io/cloud-builders/docker'\n args: ['build', '-t', 'gcr.io/my-project/image1', '.']\n options:\n machineType: 'E2_HIGHCPU_8'\n\n3. Start the build using the [gcloud CLI](/build/docs/running-builds/start-build-manually)\n or [build triggers](/build/docs/automating-builds/create-manage-triggers).\n\n### JSON\n\n1. Open your [build config file](/build/docs/build-config-file-schema).\n\n2. Update the [`machineType`](/build/docs/api/reference/rest/v1/projects.builds#machinetype)\n field to an enum value corresponding to one of the [supported machine types for default pools](/build/pricing).\n The following example shows how to add the `machineType` option to a\n build config file:\n\n {\n \"steps\": [\n {\n \"name\": \"gcr.io/cloud-builders/docker\",\n \"args\": [\"build\", \"-t\", \"gcr.io/my-project/image1\", \".\"]\n },\n \"options\": {\n \"machineType\": \"E2_HIGHCPU_8\"\n }\n }\n\n3. Start the build using the [gcloud CLI](/build/docs/running-builds/start-build-manually)\n or [build triggers](/build/docs/automating-builds/create-manage-triggers).\n\nIncrease vCPU for private pools\n-------------------------------\n\n### Console\n\n1. Open the **Worker pool** page in the Google Cloud console:\n\n [Open the Cloud Build worker pool page](https://console.cloud.google.com/cloud-build/settings/worker-pool)\n2. Select the project in which you created the private pool.\n\n3. Click on the private pool name.\n\n4. In the **Edit private pool** side panel, use the **Machine type** drop-down\n to select a larger machine type.\n\n5. Click **Save**.\n\n### gcloud\n\nYou can increase the vCPU for running builds in a private pool either by passing\nthe value directly to the `gcloud builds worker-pools update` command or by\nspecifying the value in the private pool config file.\n\n**Specify the value in the private pool config file:**\n\n1. Open your [private pool config\n file](/build/docs/private-pools/worker-pool-config-file-schema).\n\n2. Update the value of `machineType` field to one of the supported\n [machine types](/build/docs/private-pools/private-pool-config-file-schema#machinetype) .\n\n3. Run the following command, where \u003cvar translate=\"no\"\u003ePRIVATEPOOL_ID\u003c/var\u003e is\n the unique identifier for your private pool, \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e\n is the region where your private pool is located, and \u003cvar translate=\"no\"\u003ePRIVATEPOOL_CONFIG_FILE\u003c/var\u003e\n is the name of your private pool config file:\n\n gcloud builds worker-pools update \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePRIVATEPOOL_ID\u003c/span\u003e\u003c/var\u003e \\\n --region=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eREGION\u003c/span\u003e\u003c/var\u003e \\\n --config-from-file=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePRIVATEPOOL_CONFIG_FILE\u003c/span\u003e\u003c/var\u003e\n\n**Pass the value directly to the `gcloud builds worker-pools update` command:** \n\n gcloud builds worker-pools update \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nx\"\u003ePRIVATEPOOL_ID\u003c/span\u003e\u003c/var\u003e \\\n --region=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nx\"\u003eREGION\u003c/span\u003e\u003c/var\u003e \\\n --worker-machine-type=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-nx\"\u003ePRIVATEPOOL_MACHINE_TYPE\u003c/span\u003e\u003c/var\u003e\n\nReplace the placeholder values in the above commands with the following:\n\n- \u003cvar translate=\"no\"\u003ePRIVATEPOOL_ID\u003c/var\u003e: the ID of your existing private pool. You cannot update this value; you must specify an existing private pool ID.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e: the [region](/build/docs/locations) where you created your private pool.\n- \u003cvar translate=\"no\"\u003ePRIVATEPOOL_DISK_SIZE\u003c/var\u003e: the updated disk size.\n- \u003cvar translate=\"no\"\u003ePRIVATEPOOL_MACHINE_TYPE\u003c/var\u003e is the updated machine type.\n\n Cloud Build uses the updated machine type anytime you run builds\n using corresponding private pool.\n\nWhat's next\n-----------\n\n- Learn about more best practices to [speed up builds](/build/docs/optimize-builds/speeding-up-builds)."]]