Hybrid Core Allocation:从过度分配到可靠共享

April 21, 2026

2026 年 4 月 21 日

Alexandr Sudakov

Alexandr Sudakov

Alexandr Sudakov

Senior Software Engineer

高级软件工程师

Ivan Shibitov

Ivan Shibitov

Ivan Shibitov

Staff Software Engineer

资深软件工程师

Introduction

介绍

Some time ago, we introduced cpusets into Odin, Uber’s stateful container orchestration system. This change gives us stricter control over how CPU time is allocated, which helps cut down on throttling, and reduces latency, but comes at the cost of assigning full dedicated CPUs.

不久前,我们将 cpusets 引入 Odin,这是 Uber 的有状态容器编排系统。这一变化让我们对 CPU 时间的分配有了更严格的控制,这有助于减少节流,并降低延迟,但代价是分配完整的专用 CPU。

For years, our vertical CPU scaler operated under the assumptions that CPU usage could be accurately measured using one-minute averages, that cores allocated to a node were dedicated and not shared, and that CPU utilization targets could adjust to changes in failover load.

多年来,我们的垂直 CPU 缩放器在以下假设下运行:可以使用一分钟平均值准确测量 CPU 使用率、分配给节点的内核是专用的而不是共享的,以及 CPU 利用率目标可以调整以适应故障转移负载的变化。

While these assumptions provided a baseline for managing workloads, they proved insufficient for handling bursty CPU usage patterns. In this post, we describe how we use cpusets, cpu_shares, and our key observation at the host level to improve the performance, reliability, and cost-effectiveness of colocated workloads.

虽然这些假设为管理工作负载提供了基线,但它们不足以处理突发性的 CPU 使用模式。在本文中,我们描述了如何使用 cpusetscpu_shares 以及我们在主机级别的关键观察来改善共置工作负载的性能、可靠性和成本效益。

From Dedicated to Hybrid

从专用到混合

The Odin platform is evolving to handle workloads with bursty CPU profiles more intelligently. The new model introduces shared core allocation alongside dedicated cores:

Odin 平台正在演进,以更智能地处理具有突发性 CPU 配置文件的工作负载。新模型引入了共享核心分配,与专用核心并行:

  • Hybrid allocation. Workloads now receive both dedicated (reserved) cores and an optional number of shared cores.
  • 混合分配。 工作负载现在同时接收专用(保留)核心和可选数量的共享核心。
  • Over-allocation control. Shared cores are pooled per host and over-allocated using a defined ratio.
  • 超分配控制。 共享核心按主机池化,并使用定义的比例进行超分配。
  • Fair contention handling. Linux® cpu.shares dynamically distribute shared CPU time based on allocation size.
  • 公平的争用处理。 Linux® cpu.shares 根据分配大小动态分配共享 C...
开通本站会员,查看完整译文。

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-05-04 00:29
浙ICP备14020137号-1 $mapa de visitantes$