-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
google_cloud_run_v2_service: when resources
are specified cpu_idle
defaults to false
#17246
Comments
Unfortunately, this is consistent with the default CPU allocation of Cloud Run services. CPU is throttled outside of requests. Jobs and future non-request based workloads default to CPU always on. |
Unless Cloud Run API changes its behavior, this is Working As Intended for the terraform module |
@steren what I am seeing is that when resources are explicitly specified that CPU stops being throttled outside of requests. |
This behavior is controlled by the api. Forward the issue to the service team |
The problem is I'll update the document to call this out. Unfortunately it can't be improved without API change or a breaking change in TF side to set client side default value to |
I get it. It's an unfortunate design choice that creates a "footgun" where customers hoping to just express resource bounds end up potentially 10x-ing their bill. After finding this issue, I flagged a whole bunch of places where our folks were holding this wrong, and in all of them the bill dropped by a significant multiple. Like I said, I think this violates the "principle of least surprise" and you are likely to end up with surprised and grumpy customers as a result of this, so you should think about ways to mitigate this if you can't change this. We've worked around this ourselves, and I think you've heard the feedback, so we can close this issue out. |
Resolved with improved documentation via GoogleCloudPlatform/magic-modules#10005. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
to expedite investigation and resolution of this issue.
Terraform Version
TF: 1.5, 1.6
I think we're on ~5.14 of the Google provider.
Affected Resource(s)
google_cloud_run_v2_service
Terraform Configuration
Debug Output
No response
Expected Behavior
When the above is applied, it shows up in the console as idling the CPU when requests aren't in flight.
Actual Behavior
When the above is applied, it shows up in the console as an ALWAYS ON CPU.
Steps to reproduce
Important Factoids
IMO it violates the principle of least surprise for the default of a knob I am not turning to CHANGE when I am turning other knobs (which is why this smells like a provider bug). I can see a 20-50x improvement in the CPU allocation metrics in some of our environments after correcting this for just a handful of services (still waiting to see the billing impact).
This is the past ~week's CPU allocation in one environment, where we fixed this for the handful of services that were specifying resources last night:
cc @steren
References
No response
b/324764802
The text was updated successfully, but these errors were encountered: