-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ws-daemon] Refactor CPU limiting #8036
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Associated issue: #8035 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report
@@ Coverage Diff @@
## main #8036 +/- ##
==========================================
+ Coverage 12.01% 15.21% +3.19%
==========================================
Files 20 45 +25
Lines 1190 4352 +3162
==========================================
+ Hits 143 662 +519
- Misses 1043 3633 +2590
- Partials 4 57 +53
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
a217998
to
03e64e1
Compare
982022d
to
206e844
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installer changes look good to me.
/approve
206e844
to
a93e556
Compare
@sagor999 I've incorporated your feedback - please take another look |
a93e556
to
cf3b4c6
Compare
Description
This PR refactors the dynamic CPU limiting performed by ws-daemon. More details regarding motivation and solution can be found in this loom video: https://www.loom.com/share/0922bf11430c4ac084ebab6616e40b7e
This PR also adds a set of metrics to observe the new CPU limits:
gitpod_ws_daemon_cpulimit_workspaces_added_total
: Number of workspaces added to CPU controlgitpod_ws_daemon_cpulimit_workspaces_removed_total
Number of workspaces removed from CPU controlgitpod_ws_daemon_cpulimit_workspaces_burst_total
: Number of workspaces which received burst -gitpod_ws_daemon_cpulimit_workspaces_cputime_seconds
CPU time of all observed workspacesgitpod_ws_daemon_cpulimit_workspaces_throttled_total
Number of workspaces which ran with throttled CPURelated Issue(s)
Fixes #8035
How to test
By default dynamic CPU limiting is disabled. It can be enabled using the experimental config in the installer, or by modifying the ws-daemon configmap. Therein, set the cpuLimiting.enabled to true, and configure the total available bandwidth on the node (e.g. 12 CPUs), limit and burst limit.
Then, start a few workspaces, observe their
/sys/fs/cgroup/cpu/cpu.cfs_quota_us
value while producing some CPU load.In addition, one could try this version on a single VM and experiment with workspaces exhibiting different load profiles.
Chaveats
bash
andtheia
andgitpod-node
only. If we find user experience deteriorated too much by this removal, we'll want to bring it back in a future change.Release Notes