Loading...

How GitHub Actions handles CI/CD scale on short-running jobs with Ephemeral OS disk Reimage

How GitHub Actions handles CI/CD scale on short-running jobs with Ephemeral OS disk Reimage

Background

GitHub Actions makes it easy for customers to automate all their software workflows, with world-class CI/CD. Users can build, test, and deploy their code right from GitHub. Whether they want to build a container, deploy a web service, or automate welcoming new users to their open-source projects—there's an action for that.

 

The Challenge

GitHub Actions must always provide a clean VM for each job. To support this at scale as of January 2022, GitHub Actions would have had to delete and recreate more than 7 million VMs per day. GitHub has lots of customers doing very short jobs like updating issues, simple Cron jobs and more. These jobs would not take more than 5 mins to complete. It takes ~2 mins to delete a VM, recreate it, and then run custom extension scripts to get the VM ready for use. For a job that runs no more than 5 mins spending more than 2 mins on setup is an expensive affair. When recreating a VM the corresponding OS caches would be deleted, and that impacted the read IOPS. They needed a reliable and efficient solution to get the VMs faster.

 

The Solution: Ephemeral OS disk Reimage

Reimage can be performed on a single instance VM or VMSS using Ephemeral OS disks. It is highly efficient and reliable (99.99%). Ephemeral OS disks reimage for VM or reimage for VMSS is equivalent to deleting and re-creating a VM of the same config. The reimage would replace the old OS disk with a new OS disk, and optionally resets the Temp disk contents (if this is included as a parameter) and you would retain,

  1. Data disks,
  2. Current configuration of the VM and
  3. Public IP associated with the VM

The average end-to-end time was reduced by 50% after replacing “deleting a VM, recreating it and then run custom extension scripts" with “Ephemeral OS disks Reimage”. This also helped in reducing the VM pools size.

 

“We saw our target machine count reduce by 15-20%.”

– Chad Kimes, Staff Software Engineer, GitHub

 

The below chart shows GitHub Actions VM pools jobs reimage performance between Ephemeral and Non-Ephemeral (in seconds).

 

Reimage_perf_comparison_secs.jpg

 

“The Ephemeral pool ran more customer requests than the non-Ephemeral because of its throughput efficiency. “

– Jiange Sun, Senior Software Engineer, GitHub

 

Along with the re-image being faster than deleting/creating a new VM, GitHub has also seen the below advantages with Ephemeral VMs

  • Faster reads as cached parts of the OS disk should persist around after reimage (if it is not dirty)
  • No leaking disks

“Apart from faster reimages, Ephemeral also saves us time setting up machines after each reimage because we no longer need to run "warm-up" scripts, where the sole intention was to forcibly populate more of the disk image on the host”

– Chad Kimes, Staff Software Engineer, GitHub

 

Related links

 

  • Learn more about Ephemeral OS disks
  • If you are interested to try out GitHub Actions, try out the quick start guide to improve your CI/CD experience today

Please share your feedback or questions in the comments section below.

Published on:

Learn more
Need help with this product?

We can help you with How GitHub Actions handles CI/CD scale on short-running jobs with Ephemeral OS disk Reimage

If you want help implementing, troubleshooting, or improving this product, contact us and we’ll point you in the right direction.

Azure Compute Blog articles
Azure Compute Blog articles

Azure Compute Blog articles

Share post:

Related posts

Upcoming Changes to Instance Size Flexibility Ratios for Reserved VM Instances for M-series: What Yo

Overview In the ever-evolving landscape of cloud computing, it is crucial to stay informed about changes that may affect your usage and busine...

1 year ago

Exploring SUSE Enterprise Linux on Azure

Exploring SUSE Enterprise Linux on Azure In today's cloud-centric world, leveraging robust and reliable operating systems is crucial for busin...

1 year ago

Announcing Public Preview of new attach/detach disks API for VMs/VMSS

We are excited to announce the public preview of a new API that will make attaching and detaching disks to a VM faster and easier. The new API...

1 year ago

Fine-tuning a Hugging Face Diffusion Model on CycleCloud Workspace for Slurm

Introduction Azure CycleCloud Workspace for Slurm (CCWS) is a new Infrastructure as a Service (IaaS) solution which allows the users to purpos...

1 year ago

Public Preview Announcement-On Demand Capacity Reservation in Azure in China

Today, we're announcing the public preview of on demand capacity reservations for Azure Virtual Machines in Azure in China Cloud . Y...

1 year ago

Breaking change for Window Server 2022 Image Users with .NET 6

Azure Marketplace media images for Windows Server 2022 currently include .NET 6, but going forward will not include a .NET version with the im...

1 year ago

Announcing the public preview of the new Azure FXv2-series Virtual Machines

Today, Microsoft is announcing the public preview of the new Azure FXv2-series Virtual Machines (VMs), based on the 5th Generation Intel® Xeon...

1 year ago

Effortlessly Migrate Azure VMs between zones

For various reasons you might come across a situation when you need to migrate your Azure VMs from one zone to another. Migrating Azure VMs be...

1 year ago

Announcing Public Preview of Instance Mix on Virtual Machine Scale Sets

Today, we’re excited to announce that the ability to specify multiple different VM sizes in your Virtual Machine Scale Sets (VMSS) with Flexib...

1 year ago

Announcing General Availability of Attach & Detach of Virtual Machines on Virtual Machine Scale Sets

Today, we’re thrilled to announce that the ability to attach or detach Virtual Machines (VMs) to and from a Virtual Machine Scale Set (VMSS) w...

2 years ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.