BlogsUberHybrid CPU Allocation for Stateful Containers

Hybrid CPU Allocation for Stateful Containers

Hybrid CPU Allocation for Stateful Containers

1
posts
2026

Uber's Odin platform has evolved its CPU allocation strategy for stateful containers by introducing a hybrid model that combines dedicated and shared cores. This addresses the limitations of previous models that relied on one-minute averages and dedicated cores, which were insufficient for bursty CPU usage. The new model allows for over-allocation of shared cores pooled per host, with Linux's cpu.shares dynamically distributing CPU time during contention. The system also incorporates NUMA considerations for efficient memory access and in-place vertical scaling without relocating workloads. The decision-making for CPU allocation is currently host-level but is planned to move to a higher-level workload scheduler. Efforts are underway to bridge Kubernetes gaps for hybrid core allocation by factoring out cgroups management code into a standalone library and wrapping it into a Kubernetes CRI plugin. The goal is to reduce overprovisioning, increase fleet-wide CPU utilization, and maintain service-level performance guarantees.

2026

Hybrid Core Allocation: From Overallocation to Reliable Sharing

4/21/2026

This post details the implementation of a hybrid CPU allocation model in Uber's Odin system, combining dedicated and shared cores for stateful containers. It introduces the use of Linux cpusets and cpu.shares for dynamic allocation and fair contention handling, with a specific formula for calculating cpu.shares. The post also discusses NUMA considerations for CPU and memory affinity, the host agent's strategy for balancing shared and dedicated cores across NUMA nodes, and the implementation of in-place vertical scaling. It highlights the need to bridge Kubernetes gaps for hybrid core allocation and identifies limitations such as host-level decision-making and potential CPU allocation fragmentation.