FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
New Conversion from cgroup v1 CPU Shares to v2 CPU Weight
NewsDevOps

New Conversion from cgroup v1 CPU Shares to v2 CPU Weight

via Kubernetes Blog2mo ago

I'm excited to announce the implementation of an improved conversion formula from cgroup v1 CPU shares to cgroup v2 CPU weight. This enhancement addresses critical issues with CPU priority allocation for Kubernetes workloads when running on systems with cgroup v2. Background Kubernetes was originally designed with cgroup v1 in mind, where CPU shares were defined simply by assigning the container's CPU requests in millicpu form. For example, a container requesting 1 CPU (1024m) would get (cpu.shares = 1024). After a while, cgroup v1 started being replaced by its successor, cgroup v2. In cgroup v2, the concept of CPU shares (which ranges from 2 to 262144, or from 2¹ to 2¹⁸) was replaced with CPU weight (which ranges from [1, 10000], or 10⁰ to 10⁴). With the transition to cgroup v2, KEP-2254 introduced a conversion formula to map cgroup v1 CPU shares to cgroup v2 CPU weight. The conversion formula was defined as: cpu.weight = (1 + ((cpu.shares - 2) * 9999) / 262142) This formula linearly

Continue reading on Kubernetes Blog

Opens in a new tab

Read Full Article
13 views

Related Articles

The Outbox Pattern: A Consistent Approach to Distributed Transactions
News

The Outbox Pattern: A Consistent Approach to Distributed Transactions

Medium Programming • 2d ago

6o6 v1.1: Faster 6502-on-6502 virtualization for a C64/Apple II Apple-1 emulator
News

6o6 v1.1: Faster 6502-on-6502 virtualization for a C64/Apple II Apple-1 emulator

Lobsters • 2d ago

ChemBERTa-2: Towards Chemical Foundation Models
News

ChemBERTa-2: Towards Chemical Foundation Models

Dev.to • 2d ago

Test title
News

Test title

Dev.to Tutorial • 2d ago

Legacy PC design misery
News

Legacy PC design misery

Lobsters • 2d ago

Discover More Articles