Skip to content

Commit 3be4300

Browse files
committed
osd/scrub: disable high work-queue priority for h.p. scrub
Prior to this fix, scrub-related messages were queued with one of four priorities: - if part of a regular, periodic scrub, the messages were queued with a very low priority (osd_scrub_priority. Default: 5), unless: - if the pool configuration specified a higher priority for the scrub, the messages were queued with that priority (the SCRUB_PRIORITY pool configuration option); - if a client operation was waiting for the scrub to complete, the messages were queued with the higher priority of the client ops (osd_client_op_priority. Default: 63); and if the scrub was a high-priority one, e.g. initiated by the operator, the messages were queued with the highest priority (osd_requested_scrub_priority. Default: 120). That last priority is too high, as scrubs should not have precedence over client ops. It is even more disruptive if the cluster is set to have only manually initiated scrubs, and all scrubs are high-priority ones. This patch removes the osd_requested_scrub_priority. Instead, all scrub messages are queued according to the first three rules above. Signed-off-by: Ronen Friedman <[email protected]>
1 parent 2c46870 commit 3be4300

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

src/common/options/global.yaml.in

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3705,11 +3705,8 @@ options:
37053705
type: uint
37063706
level: advanced
37073707
default: 5
3708-
fmt_desc: The priority set for user requested scrub on the work queue. If
3709-
this value were to be smaller than ``osd_client_op_priority`` it
3710-
can be boosted to the value of ``osd_client_op_priority`` when
3711-
scrub is blocking client operations.
3712-
with_legacy: true
3708+
fmt_desc: deprecated. Use ``osd_scrub_priority`` instead.
3709+
with_legacy: false
37133710
- name: osd_recovery_priority
37143711
type: uint
37153712
level: advanced

src/osd/scrubber/pg_scrubber.cc

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,15 +1671,7 @@ void PgScrubber::set_op_parameters(ScrubPGPreconds pg_cond)
16711671
m_flags.deep_scrub_on_error = false;
16721672
}
16731673

1674-
if (ScrubJob::has_high_queue_priority(m_active_target->urgency())) {
1675-
// specific high priority scrubs - high queue priority
1676-
/// \todo consider - do we really want high queue priority for any scrub?
1677-
m_flags.priority = get_pg_cct()->_conf->osd_requested_scrub_priority;
1678-
} else {
1679-
// regular, low-priority scrubs - low queue priority - unless blocking
1680-
// client I/O
1681-
m_flags.priority = m_pg->get_scrub_priority();
1682-
}
1674+
m_flags.priority = m_pg->get_scrub_priority();
16831675

16841676
// The publishing here is required for tests synchronization.
16851677
// The PG state flags were modified.

0 commit comments

Comments
 (0)