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

Improve worker load threshold detection #6010

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

okurz
Copy link
Member

@okurz okurz commented Oct 15, 2024

With 03b301d we have a worker load limit which helps but there can still
be cases like happened on a PowerNV machine with the load going way above
the configured load limit. The reason was that when the worker was idle
within a short time frame of roughly one minute multiple jobs were
assigned to individual worker instances on the machine. As we only
looked at load15 which was still low at that time all jobs were picked
up by the machine leading to overload only about one minute later.
Further reducing the load limit would not realistically prevent this
situation but only delay until load15 decays sufficiently enough so that
new jobs will be picked up again. Instead this commit changes the
evaluation to look at all three system load values, load1, load5 and
load15, but considering the load evolution over time to react quickly
enough if the load rises but still accept a falling edge to allow to
pick up jobs again when the load decays.

Related progress issue: https://progress.opensuse.org/issues/168244

@okurz okurz marked this pull request as draft October 15, 2024 19:47
lib/OpenQA/Worker.pm Outdated Show resolved Hide resolved
lib/OpenQA/Worker.pm Outdated Show resolved Hide resolved
With 03b301d we have a worker load limit which helps but there can still
be cases like happened on a PowerNV machine with the load going way above
the configured load limit. The reason was that when the worker was idle
within a short time frame of roughly one minute multiple jobs were
assigned to individual worker instances on the machine. As we only
looked at load15 which was still low at that time all jobs were picked
up by the machine leading to overload only about one minute later.
Further reducing the load limit would not realistically prevent this
situation but only delay until load15 decays sufficiently enough so that
new jobs will be picked up again. Instead this commit changes the
evaluation to look at all three system load values, load1, load5 and
load15, but considering the load evolution over time to react quickly
enough if the load rises but still accept a falling edge to allow to
pick up jobs again when the load decays.

Related progress issue: https://progress.opensuse.org/issues/168244
@okurz okurz changed the title wip -- tests fail -- Improve worker load limit Improve worker load threshold detection Oct 16, 2024
@okurz okurz marked this pull request as ready for review October 16, 2024 19:33
@okurz
Copy link
Member Author

okurz commented Oct 16, 2024

  1. Incorporated @perlpunk's suggestions
  2. Extended test cases with a dedicated load detection subtest which is significantly faster than extending the worker restarting based tests
  3. Extended the algorithm to also handle short-term load dips and plateaus

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.93%. Comparing base (7c2b6c3) to head (519058c).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6010   +/-   ##
=======================================
  Coverage   98.93%   98.93%           
=======================================
  Files         396      396           
  Lines       39346    39363   +17     
=======================================
+ Hits        38925    38945   +20     
+ Misses        421      418    -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants