Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloudrun Background tasks and cpu throttling

Hello 

We have a cloud run service deployed that performs computationally heavy data analysis and is invoked via incoming http requests . It appears that CPU on cloud run is severely limited after the service responds to the http request, based on testing locally on a VM with limited resources. The process locally would take ~ 5 minutes, compared to ~15 minutes on cloudrun

We like the concept of cloudrun for this application, but are we perhaps using the wrong Google product?

Is there a different implementation we should consider? 

- two cloudrun services 

- a vm?

-gke?

 

 

0 2 802
2 REPLIES 2

Hi @serverless_mike,

Welcome to Google Cloud Community!

There are several factors that you may consider in deploying your application in either Cloud Run, VM or GKE.

For Cloud Run, your app should meet all the following criteria:

If your app didn't meet the above criteria, you may check out other hosting options like Cloud Functions or Compute Engine.

VM lets you use a deployment strategy for your workload. You could decide how would you choose the most optimal deployment strategy:

  1. Start by assessing the key requirements of your application.
  2. Review the available deployment options and their relative merits.
  3. Select a strategy that meets your requirements and makes optimal use of the capabilities of Compute Engine.

Google Kubernetes Engine (GKE) also has different use cases like fully-managed data solutions or running your stateful application. 

You may want to check the following documentations/references that you may find helpful if which service your application seem fit.

Cloud Run:

VM (Compute Engine)

GKE:

Hope this helps.

Hi,

Consider turning on the "CPU always allocated" feature.
Here's a bit more information:
https://cloud.google.com/run/docs/configuring/cpu-allocation

Regards,
Karolina