Skip to content
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

UtilizationBasedLimiter: Get wall time after CPU time #5526

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

aknuds1
Copy link
Contributor

@aknuds1 aknuds1 commented Jul 17, 2023

What this PR does

Change pkg/util/limiter.UtilizationBasedLimiter to get current wall time after CPU time. My thinking is that if extracting the CPU time from /proc would be somehow delayed, the calculated CPU utilization would be too high (on account of elapsed wall time being too short vs. elapsed CPU time).

Which issue(s) this PR fixes or relates to

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@aknuds1 aknuds1 requested a review from a team as a code owner July 17, 2023 15:03
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
@aknuds1 aknuds1 force-pushed the arve/utilization-limiter-now-after branch from 68cba95 to fce80a0 Compare July 17, 2023 15:04
@aknuds1 aknuds1 added component/ingester bug Something isn't working labels Jul 17, 2023
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice improvement

@pracucci pracucci enabled auto-merge (squash) July 17, 2023 15:23
@pracucci pracucci merged commit 07f689c into main Jul 17, 2023
@pracucci pracucci deleted the arve/utilization-limiter-now-after branch July 17, 2023 15:28
grafanabot pushed a commit that referenced this pull request Jul 17, 2023
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 07f689c)
aknuds1 added a commit that referenced this pull request Jul 17, 2023
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 07f689c)

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants