Looking at documentation:
--cpu=CPUSet a CPU limit in Kubernetes cpu units.
Cloud Run (fully managed) supports values 1, 2 and 4. For Cloud Run (fully managed), 4 cpus also requires a minimum 2Gi --memory value. Examples 2, 2.0, 2000m
Cloud Run for Anthos and Knative-compatible Kubernetes clusters support fractional values. Examples .5, 500m, 2
Kubernetes page says:
Limits and requests for CPU resources are measured in cpu units. In Kubernetes, 1 CPU unit is equivalent to 1 physical CPU core, or 1 virtual core, depending on whether the node is a physical host or a virtual machine running inside a physical machine.
So does this setting control the CPU per VM or is it the total amount of CPU? Same question applies to the --memory flag.
Solved! Go to Solution.
According to this documentation:
You can set CPU limits for Cloud Run services and jobs.
By default, each container instance is limited to 1 CPU. You can increase this using any integer value up to a maximum of 8 CPUs. Note that setting CPU greater than 4 is a preview feature.
The following are minimum memory requirements for CPUs:
CPUs |
Minimum memory |
4 |
2 GiB |
6 PREVIEW |
3 GiB |
8 PREVIEW |
4 GiB |
This setting will control the CPU per instance created
According to this documentation:
You can set CPU limits for Cloud Run services and jobs.
By default, each container instance is limited to 1 CPU. You can increase this using any integer value up to a maximum of 8 CPUs. Note that setting CPU greater than 4 is a preview feature.
The following are minimum memory requirements for CPUs:
CPUs |
Minimum memory |
4 |
2 GiB |
6 PREVIEW |
3 GiB |
8 PREVIEW |
4 GiB |
This setting will control the CPU per instance created
What does it mean "preview feature"? Should I enable it somewhere before I can use it?
Currently I can't set CPU higher than 4