actions / runner-images

GitHub Actions runner images
MIT License
9.64k stars 2.96k forks source link

First run of az-cli is slow #10110

Open lanni-energinet opened 1 month ago

lanni-energinet commented 1 month ago

Description

For quite some time we have been impacted by poor performance due to the nature of az-cli's command and module caching on it's first run. It would seem that az-cli was not written with ephemeral runners in mind, and it doesn't look like they could change this easily. Hence why we are opening this issue here.

We can see that the issue is fixed on windows images as a simple warmup has been implemented https://github.com/actions/runner-images/blob/c5c9a7cd7b2cfd20d740f7667fdaca8a412f2b52/images/windows/scripts/build/Install-AzureCli.ps1#L22

Can you please implement a simple warm up like on the windows runners?

From a sample of our logs we have measured the following impact Minimum 2 s Maximum 31 s Average 5 s

We estimate wasting roughly 6500 minutes per month which is more than 10% of our of total usage

Platforms affected

Runner images affected

Image version and build link

https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20240609.1

Is it regression?

no

Expected behavior

A build-in warmup in the ubuntu image creation similar to the windows image

Actual behavior

No warmup

Repro steps

None needed

kishorekumar-anchala commented 1 month ago

HI @lanni-energinet ,

Thank you for bringing this issue to us, we are investigating on this issue and we will update you on this issue after our findings.