New issue
Advanced search Search tips

Issue 863236 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 31
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocked on:
issue 864655

Blocking:
issue 863182



Sign in to add a comment

skylab-suite: Fix priority inversion

Project Member Reported by pprabhu@chromium.org, Jul 12

Issue description

Currently, skylab_suite is duplicating the priority logic from autotest.
See: https://cs.corp.google.com/chromeos_public/src/third_party/autotest/files/venv/skylab_suite/suite_parser.py?l=57
and
https://cs.corp.google.com/chromeos_public/src/third_party/autotest/files/client/common_lib/priorities.py

But Swarming has the opposite concept of priority -- lower number indicates higher priority.

Some other important constants here are:

Default swarming task priority: 100 (supplied by the swarming client)
Minimum allowed swarming priority: 10

So, not only is this inverting the priorities (PFQ will preempt CQ), some of the really low priority stuff (like Weekly) will run at the lowest allowed priority.

We need to decide on a priority scheme for skylab tasks.
 
Blocking: 863182
My proposal for priorities in skylab:
Normal task priorities range from 48 - 255 (the allowed max)
Anything below 48 will be used by crosskylabadmin for fleet management tasks.

Within that, 

Weekly: 160
Daily: 145
PostBuild: 130
Default: 100 (This is also the swarming client default)
Build: 80
PFQ: 65
CQ: 50
Super: 49 (I suspect this is a leftover from the old world, and is effectively dead. We still need to assign it something though)

This gives each assigned suite priority level at least 15 priorities to play with, and keeps the Default priority the same as the swarming client.
Cc: akes...@chromium.org ayatane@chromium.org
Re #2, sure. A question: “This gives each assigned suite priority level at least 15 priorities to play with", how to understand this?
Re #4: by keeping the difference between priorities of consecutive suites at least 15, we allow the tests running within those suites to use those 15 priorities as needed.

For example, we'd like to retry tests within a suite at a higher priority than the original tests.
Can we use a cleaner multiple than 15, like 20, or 100?
As long as it's above 20. You should probably extend into the 200~250 range too, it's underused. :)
Project Member

Comment 8 by bugdroid1@chromium.org, Jul 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/89300762a5b2bb53d8dbba61e27b8c0aa269ecfb

commit 89300762a5b2bb53d8dbba61e27b8c0aa269ecfb
Author: Xixuan Wu <xixuan@chromium.org>
Date: Tue Jul 17 18:32:45 2018

SkylabSuite: Set the new priority choices.

The previous priority choices for skylab suite is wrong. See
 crbug.com/863236  for more details. This CL change the priority's choices to
a newly defined map.

BUG= chromium:863236 
TEST=Ran "bin/run_suite_skylab --pool=suites --board=nyan_blaze
--suite_name=sanity --build=nyan_blaze-release/R69-10763.0.0 --priority
50 --timeout_mins 5 --test_retry --max_retries 5" locally.

Change-Id: Icd82c3b578b22f441646001a4f506b9c10bc6679
Reviewed-on: https://chromium-review.googlesource.com/1137101
Commit-Queue: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Trybot-Ready: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>

[modify] https://crrev.com/89300762a5b2bb53d8dbba61e27b8c0aa269ecfb/venv/skylab_suite/swarming_lib.py
[modify] https://crrev.com/89300762a5b2bb53d8dbba61e27b8c0aa269ecfb/venv/skylab_suite/suite_parser.py

Project Member

Comment 9 by bugdroid1@chromium.org, Jul 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/c1a668e562068f2e9414edfc288d0d562fae2d21

commit c1a668e562068f2e9414edfc288d0d562fae2d21
Author: Xixuan Wu <xixuan@chromium.org>
Date: Tue Jul 17 18:58:34 2018

autotest: Pass suite priority to its child tests

Run_suite_skylab forgot to pass suite priority to its child tests
before for normal suite. This CL adds it back.

BUG= chromium:863236 
TEST=Ran "bin/run_suite_skylab --pool=suites --board=nyan_blaze
--suite_name=sanity --build=nyan_blaze-release/R69-10763.0.0 --priority
50 --timeout_mins 5 --test_retry --max_retries 5" locally.

Change-Id: I2ded5240ea5b0384967262570e9d0741e434aa73
Reviewed-on: https://chromium-review.googlesource.com/1140677
Commit-Queue: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>

[modify] https://crrev.com/c1a668e562068f2e9414edfc288d0d562fae2d21/venv/skylab_suite/suite_runner.py

Mid-flight request on this bug.

maruel@ lowered the default priority in  issue 864655 

I think we should use the larger priority range available now.

New plan:

Weekly: 230
Daily: 200
PostBuild: 170
Default: 140
Build: 110
PFQ: 80
CQ: 50
Super: 49 (I suspect this is a leftover from the old world, and is effectively dead. We still need to assign it something though)

- This now gives us 30 priority levels within between consecutive suites (except Weekly, which has only 25, but it's already the lowest priority suite, so meh)
- Note that after  issue 864655 , the swarming client default priority is 200, which matches the "Daily" suite. We should document that any developer triggered suites should use the "Default" suite priority level of 140 instead (and any future cli tool for skylab should set this internally)
Blockedon: 864655
Project Member

Comment 13 by bugdroid1@chromium.org, Jul 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/fb6bb7f1e1e9671594b2e8dfa57090d2d762423e

commit fb6bb7f1e1e9671594b2e8dfa57090d2d762423e
Author: Xixuan Wu <xixuan@chromium.org>
Date: Fri Jul 20 00:06:37 2018

autotest: Update the new settings of skylab suites priority.

BUG= chromium:863236 
TEST=None

Change-Id: Ie8c2465c5cc5a7c9be62bfa100c321f8f270627f
Reviewed-on: https://chromium-review.googlesource.com/1144460
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Commit-Queue: Xixuan Wu <xixuan@chromium.org>

[modify] https://crrev.com/fb6bb7f1e1e9671594b2e8dfa57090d2d762423e/venv/skylab_suite/swarming_lib.py

Project Member

Comment 14 by bugdroid1@chromium.org, Jul 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/b6704082f43ca9ac410ff6422a9c973fb0ca1e8e

commit b6704082f43ca9ac410ff6422a9c973fb0ca1e8e
Author: Xixuan Wu <xixuan@chromium.org>
Date: Fri Jul 20 12:31:33 2018

chromite: Update the new settings of skylab suites priority.

BUG= chromium:863236 
TEST=None

Change-Id: Ia81dc3f0b5a78d8e30e63e1962a1ac41bdec067b
Reviewed-on: https://chromium-review.googlesource.com/1144467
Commit-Ready: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>

[modify] https://crrev.com/b6704082f43ca9ac410ff6422a9c973fb0ca1e8e/lib/constants.py

Status: Fixed (was: Assigned)

Sign in to add a comment