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

Merged
merged 1 commit into from
Oct 22, 2024

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
@okurz okurz force-pushed the feature/worker_load_limit branch from 7d9d9ea to 519058c Compare October 16, 2024 19:30
@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

This comment was marked as resolved.

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.96%. Comparing base (0030e84) to head (f8b5424).
Report is 8 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6010   +/-   ##
=======================================
  Coverage   98.96%   98.96%           
=======================================
  Files         396      396           
  Lines       39364    39381   +17     
=======================================
+ Hits        38958    38975   +17     
  Misses        406      406           

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

Copy link
Contributor

@Martchus Martchus left a comment

Choose a reason for hiding this comment

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

Looks good, I only have two small nitpicks.

lib/OpenQA/Worker.pm Show resolved Hide resolved
lib/OpenQA/Worker.pm Outdated Show resolved Hide resolved
@okurz okurz force-pushed the feature/worker_load_limit branch from 519058c to 30896d5 Compare October 21, 2024 12:03
@okurz
Copy link
Member Author

okurz commented Oct 21, 2024

Looks good, I only have two small nitpicks.

done

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 force-pushed the feature/worker_load_limit branch from 30896d5 to f8b5424 Compare October 21, 2024 13:19
lib/OpenQA/Worker.pm Show resolved Hide resolved
lib/OpenQA/Worker.pm Show resolved Hide resolved
@mergify mergify bot merged commit 7145424 into os-autoinst:master Oct 22, 2024
46 checks passed
@okurz okurz deleted the feature/worker_load_limit branch October 22, 2024 09:05
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.

5 participants