[release-v1.0.x] adding efficient polling to waitForStepsToFinish#8913
Conversation
|
The following is the coverage report on the affected files.
|
|
/retest |
|
/kind bug |
|
@pritidesai can you rebase the PR the CI should be fixed after :) |
The current waitForStepsToFinish implementation is a classic busy-wait. It checks for file existence without any sleep, resulting in a high CPU usage. Adding a profile with a unit test to show that almost all time is spent in system calls with a high total sample count. This led to execssive CPU usage by the sidecar even when just waiting. The function now sleeps 100ms between checks, drastically reducing the frequency. The sidecar now uses minimal CPU while waiting. Signed-off-by: Priti Desai <pdesai@us.ibm.com>
Introducing getSidecarLogPollingInterval() to avoid repeating the same logic across two different functions. Signed-off-by: Priti Desai <pdesai@us.ibm.com>
b61fcf9 to
2767bd7
Compare
|
The following is the coverage report on the affected files.
|
|
The following is the coverage report on the affected files.
|
I am so sorry @waveywaves, I just saw your comment. This is ready to merge now. Thanks! |
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: waveywaves The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |

Changes
Manual Cherry-pick of #8901
#8901 (comment)
Closing auto-generated PR due to linter issues - #8910
/kind bug
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes