cloud-run-faq icon indicating copy to clipboard operation
cloud-run-faq copied to clipboard

How to calculate cpu allocated for warm containers(or idle containers)?

Open wuyafang opened this issue 4 years ago • 2 comments
trafficstars

I noticed that warm containers get their CPU throttled to ~0% when they are not processing requests,while in pricing tables(https://cloud.google.com/run/pricing) idle containers still need to be paid $0.00000250 for vCPU-seconds unit.

I was wondering how to calculate CPU allocated for warm containers(or idle containers) ?

wuyafang avatar Jun 03 '21 12:06 wuyafang

@wuyafang the question is unclear to me. Warm containers are charged at the specified rate as long as they stay around, even though they can't use the CPU (because there are no requests coming).

ahmetb avatar Jun 03 '21 16:06 ahmetb

For about when container startup is described in the Document.

Your container instances must listen for requests within 4 minutes after being started. During this startup time, container instances are allocated CPU.

https://cloud.google.com/run/docs/reference/container-contract#startup

tsu1980 avatar Jun 07 '21 06:06 tsu1980