Skip to content

Why did fixing CPU limit annotation break CPU limiting with cgroup v2? #9407

Closed
@kylos101

Description

@kylos101

Bug description

We broke the gitpod.io/cpuLimit annotation when we introduced cpu limiting. We then broke cpu limiting in this PR. As a result, many workspaces were trying to use 6 cores at the same time, and this resulted in a poor experience for users.

The intent of this issue is to:

  1. Examine what in this PR broke cpu limiting in gen39 and gen40, and why reverting it worked for gen34 (which used cgroup v2)
  2. See if we can truly fix the CPU limit annotation, without breaking CPU limiting for cgroup v2

Steps to reproduce

Revert this revert. You should be able to have many workspaces in the cluster that use up to 6 cores of CPU.

Workspace affected

n/a

Expected behavior

  1. CPU limiting should rotate CPU fairly, so it is not possible for every workspace pod to try and use 6 CPUs. For example, the 6 cores should 'rotate' from workspace to workspace - not all workspaces should be able to use 6 cores at the same time.
  2. When the gitpod.io/cpuLimit annotation is applied, ws-daemon should enforce it. For example, if it is set to 1, you get 1.

Example repository

n/a

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions