-
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 enforcing of CPU limits #7797
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: No associated issue. Update pull-request body to add a reference to an issue, or get approval with 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 #7797 +/- ##
==========================================
+ Coverage 10.86% 14.39% +3.53%
==========================================
Files 18 44 +26
Lines 1022 4370 +3348
==========================================
+ Hits 111 629 +518
- Misses 909 3676 +2767
- Partials 2 65 +63
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
b7b4c81
to
cff7aa4
Compare
50e9f1a
to
59ff214
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.
Something is off. My workspace dropped within 16 seconds from the 500 mCPU bucket to the 400 mCPU bucket:
{"containerID":"3076281461de03fd31482f809bdf57b6b60c5cf09412ddddd0269c8d926bb52f","currentQuota":-1,"instanceId":"d9152bba-23fa-4340-8649-e3fae2188473","level":"info","limit":500,"message":"set new CPU limit","quota":500000,"serviceContext":{"service":"ws-daemon","version":"commit-59ff2145fae57917e41f0711a8fea880d4ccb719"},"severity":"INFO","time":"2022-01-25T10:56:55Z","userId":"","workspaceId":"gitpodio-templatetypescr-0phi5h3mz8b"}
{"containerID":"3076281461de03fd31482f809bdf57b6b60c5cf09412ddddd0269c8d926bb52f","currentQuota":500000,"instanceId":"d9152bba-23fa-4340-8649-e3fae2188473","level":"info","limit":400,"message":"set new CPU limit","quota":400000,"serviceContext":{"service":"ws-daemon","version":"commit-59ff2145fae57917e41f0711a8fea880d4ccb719"},"severity":"INFO","time":"2022-01-25T11:04:55Z","userId":"","workspaceId":"gitpodio-templatetypescr-0phi5h3mz8b"}
ef988b8
to
26eeabe
Compare
30a89ab
to
5459604
Compare
@csweichel this seems to be working correctly.
for each 10 seconds, it was logging 50seconds of work done (5 cpu each doing 10s of work) after 600s of work done, new cpu limit was applied, limiting to 4 cpu. now for each 10 seconds it was reporting 40 seconds of work. Then next and last limit, for each 10s was reporting 20s of work. Could also see similar limiting when running htop in that workspace.
Could you try again? Also I assume this is by design(?), but limits persists per workspace. So if I stop workspace and start a new one, I start fresh. |
Closing this PR as it is superseded by this one: #8036 |
Description
jiffies
conceptcpu.cfs_period_us
How to test
wget https://cdn.pmylund.com/files/tools/cpuburn/linux/cpuburn-1.0-amd64.tar.gz && tar zxpvf cpuburn-1.0-amd64.tar.gz
./cpuburn/cpuburn
Release Notes
Documentation