Configure CPU limits for jobs

This page describes how to specify the number of vCPUs to use for eachCloud Run instance. By default, Cloud Run container instancesare limited to 1 vCPU. You can increase or decrease thisvalue as described in this page.

Set and update vCPU limits

By default, each instance is limited to 1 vCPU.You can change this to any of the values shown in the following table.

vCPU and memory table

The following are memory requirements for vCPUs:

CPUsMemory required
1 vCPU128 MiB to 4 GiB
2 vCPU128 MiB to 8 GiB
4 vCPU2 to 16 GiB
6 vCPU4 to 24 GiB
8 vCPU4 to 32 GiB

Alternatively, if you want to use less than 1 vCPU, you can select any valuebetween 0.08 and 1, in increments of 0.001. Values greater than 1 must be integervalues.If you use less than 1 vCPU, the following requirements are enforced:

SettingRequirement
MemoryA minimum of 0.5 vCPU is needed to set amemory limit greater than 512MiB.
A minimum of 1 vCPU is needed to set a memory limit greater than 1GiB.
ConcurrencyMaximum concurrency must be set to1.
BillingThebilling settings must be set to request-based billing.
ContainersYou mustdeploy multiple containers (sidecars).
Note: When selecting a vCPU limit greater than 1 vCPU, consider yourapplication's threading model. If your application is single-threaded, it mayonly fully utilize one vCPU.

Maximum amount of vCPU

The maximum amount of vCPU you can configure is 8 vCPU.

Minimum amount of vCPU

The minimum vCPU setting is 0.08 vCPU.

Required roles

To get the permissions that you need to configure Cloud Run jobs, ask your administrator to grant you the following IAM roles:

For a list of IAM roles and permissions that are associated withCloud Run, seeCloud Run IAM rolesandCloud Run IAM permissions.If your Cloud Run job interfaces withGoogle Cloud APIs, such as Cloud Client Libraries, see theservice identity configuration guide.For more information about granting roles, seedeployment permissionsandmanage access.

Configure CPU limits

You must set a minimum of 1 CPU for a Cloud Run job.

To specify CPU for a Cloud Run job:

Console

  1. In the Google Cloud console, go to the Cloud RunJobs page:

    Go to Cloud Run

  2. ClickDeploy container to fill outthe initial job settings page. If you are configuring an existing job,select the job, then clickView and edit job configuration.

  3. ClickContainer(s), Volumes, Connections, Security to expand the job properties page.

  4. Click theGeneral tab.

    image

    • Select the desired CPU limit from the dropdownlist. Select a value of1,2,4,6, or8CPUs. Jobs require a minimum of 1 CPU. (See the table underSetting and updating CPU limits for required settings.)
  5. ClickCreate orUpdate.

gcloud

  1. Update the CPU limitsof a given job by using the following command:

    gcloudrunjobsupdateJOB_NAME--cpuCPU

    Replace

    • JOB_NAME with the name of your job
    • CPU with the desired CPU limit. Specify the value1,2,4,6, or8CPUs. Jobs require a minimum of 1 CPU. (See the table underSetting and updating CPU limits for required settings.)

    You can also set CPU when youcreate a job using the command:

    gcloudrunjobscreateJOB_NAME--imageIMAGE_URL--cpuCPU

    Replace

    • JOB_NAME with the name of your job.
    • IMAGE_URL: a reference to thecontainer image—forexample,us-docker.pkg.dev/cloudrun/container/job:latest.
    • CPU with the desired CPU limit. Specify the value1,2,4,6, or8CPUs. Jobs require a minimum of 1 CPU. (See the table underSetting and updating CPU limits for required settings.)

YAML

  1. If you are creating a new job, skip this step.If you are updating an existing job, download itsYAML configuration:

    gcloudrunjobsdescribeJOB_NAME--formatexport>job.yaml
  2. Update thecpu attribute:

    apiVersion:run.googleapis.com/v1kind:Jobmetadata:name:JOBspec:template:spec:template:spec:containers:-image:IMAGEresources:limits:cpu:CPU

    ReplaceCPU with the desired CPU limit. Specify the value1,2,4,6, or8CPUs. Jobs require a minimum of 1 CPU. (See the table underSetting and updating CPU limits for required settings.)

    You can also specify more configuration such as environment variables ormemory limits.

  3. Update the existing job configuration:

    gcloudrunjobsreplacejob.yaml

Terraform

To learn how to apply or remove a Terraform configuration, seeBasic Terraform commands.

Add the following to agoogle_cloud_run_v2_job resource in your Terraform configuration:

resource"google_cloud_run_v2_job""default"{name="cloudrun-job"location="REGION"deletion_protection=falsetemplate{template{containers{image="us-docker.pkg.dev/cloudrun/container/job"resources{limits={cpu="CPU"}}}}}}

Replace:

  • REGION with the Google Cloud region. For example,europe-west1.
  • CPU with your service's required memory limit.Specify the value1,2,4,6, or8CPUs. Jobs require a minimum of 1 CPU. (See the table underSetting and updating CPU limits for required settings.)

View CPU settings

To view the current CPU settings for yourCloud Run job:

Console

  1. In the Google Cloud console, go to the Cloud Run jobs page:

    Go to Cloud Run jobs

  2. Click the job you are interested in to open theJob details page.

  3. ClickView and Edit job configuration.

  4. Locate the CPU setting in the configurationdetails.

gcloud

  1. Use the following command:

    gcloudrunjobsdescribeJOB_NAME
  2. Locate the CPU setting in the returnedconfiguration.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.