Get the latest tech news

Building Burstables: CPU slicing with cgroups


Burstable VMs run on a fraction of CPU and burst to a higher level of CPU usage to support occasional usage spikes. To implement them, we leveraged Control Groups v2 (cgroups v2), a Linux kernel feature that helps manage resource usage. We thought our open-source implementation of burstable VMs might be interesting enough to write about. We also learned a lot about Linux cgroups in the process!

This reveals real-time metrics on CPU usage, throttling events, and burst utilization - showing exactly how our constraints are being enforced on the workload. We made the cgroup setup logic run in parallel to other tasks performed during the provisioning of a VM and kept the overall elapsed time unchanged. For example, a simple fault-tolerant web app requires at least two VMs behind a load balancer, backed by a managed Postgres database.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of cpu

cpu

Photo of Building Burstables

Building Burstables

Photo of cgroups

cgroups

Related news:

News photo

Visual Transistor-level Simulation of the 6502 CPU

News photo

Microsoft announces fix for CPU spikes when typing in Outlook

News photo

Microsoft admits it's not you, Classic Outlook can be a real CPU, power hog sometimes