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

perf: Improve performance of stress relief #604

Merged
merged 6 commits into from
Feb 13, 2023

Conversation

kentquirk
Copy link
Contributor

Which problem is this PR solving?

In testing stress relief, I found that it could turn off too easily, and it might then cause refinery to crash.

Short description of the changes

  • Don't let stress relief turn off until stress levels are below the deactivation level for 10 consecutive seconds
  • Move the calculation of stress relief into the periodic stress check, rather than doing it on every span. Now each span check needs only a read lock.
  • Tweak the math for sigmoid (it had a little slop that was bugging me).

@kentquirk kentquirk requested a review from a team as a code owner February 3, 2023 02:52
@kentquirk kentquirk changed the title Improve performance of stress relief perf: Improve performance of stress relief Feb 3, 2023
@kentquirk kentquirk added type: enhancement New feature or request version: bump patch A PR with release-worthy changes and is backwards-compatible. status: review needed Changes need review. labels Feb 3, 2023
collect/stressRelief.go Show resolved Hide resolved
collect/stressRelief.go Outdated Show resolved Hide resolved
@kentquirk kentquirk merged commit f8bce15 into main Feb 13, 2023
@kentquirk kentquirk deleted the kent.stress_relief_cleanup branch February 13, 2023 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: review needed Changes need review. type: enhancement New feature or request version: bump patch A PR with release-worthy changes and is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants