Skip to content

Commit d87e905

Browse files
authored
Merge pull request ceph#63762 from cbodley/wip-rgw-lc-wp-coro
rgw/lc: replace WorkPool with ceph::async::spawn_throttle Reviewed-by: Adam Emerson <[email protected]> Reviewed-by: Matt Benjamin <[email protected]>
2 parents 848bc72 + ad4e36d commit d87e905

File tree

6 files changed

+205
-332
lines changed

6 files changed

+205
-332
lines changed

PendingReleaseNotes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@
166166
Tentacle or earlier release, the value of this field will be 'N/A'. Regular
167167
subvolumes don't have a source subvolume and therefore the output for them
168168
won't contain a "source" field regardless of the release.
169+
* RGW: The default value of `rgw_lc_max_wp_worker` has been raised from 3 to 128
170+
to accelerate lifecycle processing. These workers now use coroutines instead of
171+
separate threads.
169172

170173
* RGW: Replication policies now validate permissions using `s3:ReplicateObject`,
171174
`s3:ReplicateDelete`, and `s3:ReplicateTags` for destination buckets. For source

src/common/options/rgw.yaml.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,12 +441,12 @@ options:
441441
- name: rgw_lc_max_wp_worker
442442
type: int
443443
level: advanced
444-
desc: Number of workpool threads per LCWorker
445-
long_desc: Number of threads in per-LCWorker workpools--used to accelerate per-bucket
444+
desc: Number of workpool coroutines per LCWorker
445+
long_desc: Number of coroutines in per-LCWorker workpools--used to accelerate per-bucket
446446
processing
447-
fmt_desc: This option specifies the number of threads in each lifecycle
447+
fmt_desc: This option specifies the number of coroutines in each lifecycle
448448
workers work pool. This option can help accelerate processing each bucket.
449-
default: 3
449+
default: 128
450450
services:
451451
- rgw
452452
with_legacy: true

src/rgw/rgw_asio_thread.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
#pragma once
1717

18+
#include <assert.h>
19+
1820
class DoutPrefixProvider;
1921

2022
/// indicates whether the current thread is in boost::asio::io_context::run(),
@@ -24,3 +26,14 @@ extern thread_local bool is_asio_thread;
2426
/// call when an operation will block the calling thread due to an empty
2527
/// optional_yield. a warning is logged when is_asio_thread is true
2628
void maybe_warn_about_blocking(const DoutPrefixProvider* dpp);
29+
30+
/// enables warnings while in scope. these scopes must not be nested
31+
struct warn_about_blocking_in_scope {
32+
warn_about_blocking_in_scope() {
33+
assert(!is_asio_thread);
34+
is_asio_thread = true;
35+
}
36+
~warn_about_blocking_in_scope() {
37+
is_asio_thread = false;
38+
}
39+
};

0 commit comments

Comments
 (0)