ahmetb / cloud-run-faq

Unofficial FAQ and everything you've been wondering about Google Cloud Run.
https://cloud.run
Creative Commons Attribution 4.0 International
2.32k stars 124 forks source link

What is the performance difference between a gen1 and gen2 environment for Cloud Run #161

Closed cgrantnz closed 2 years ago

cgrantnz commented 2 years ago

Just watched this from cloud next: https://www.youtube.com/watch?v=KYBVjl6reXc and found that gen2 Cloud Run environments can be chosen - is there any benchmarking information available? Thanks!

Relevant GCloud command docs: --execution-environment=EXECUTION_ENVIRONMENT Selects the execution environment where the application will run. EXECUTION_ENVIRONMENT must be one of: gen1 Run the application in a first generation execution environement. gen2 Run the application in a second generation execution environement.

ahmetb commented 2 years ago

Hand-wavy comment as I didn't follow this space closely: I believe gen2 is not gvisor and is an actual vmm. So you're likely to get better performance for syscall-heavy workloads. Ymmv as usual.