Skip to content

tentacle: rgw/lc: group prefix rules and support ordered listing for lifecycle processing - #67614

Open
mattbenjamin wants to merge 2 commits into
ceph:tentaclefrom
linuxbox2:wip-tentacle-lcprefix
Open

mattbenjamin wants to merge 2 commits into
ceph:tentaclefrom
linuxbox2:wip-tentacle-lcprefix

Conversation

@mattbenjamin

@mattbenjamin mattbenjamin commented Mar 2, 2026 •

Copy link
Copy Markdown
Contributor

Backports: #66367 and #63731

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

kkeshava-akamai and others added 2 commits March 2, 2026 14:12
Signed-off-by: mheler <[email protected]>
(cherry picked from commit 753a55d)
Group lifecycle rules by prefix and process them in one bucket listing,
filtering invalid or zone-incompatible rules before scanning so we avoid
rescanning the bucket for each rule.

rgw/lc: change from spawn-per-rule to spawn-per-object

Currently, bucket_lc_process() spawns one coroutine per rule per
object. This means for a bucket with N lifecycle rules, we spawn
N coroutines for each object.

This creates a workpool utilization problem when there are many
rules. With the default rgw_lc_max_wp_worker=128 and 64 rules,
only ~2 objects can be processed concurrently (128 / 64 ≈ 2).
This severely limits parallelism and causes performance degradation
when multiple tag-based or other rules are configured.

This commit changes the concurrency model to spawn one coroutine
per object instead. Each coroutine processes all applicable rules
for that object sequentially. This allows the full workpool of 128
coroutines to process 128 objects concurrently, regardless of the
number of rules.

Additionally, this fixes a timing issue where rule.update() was
called inside the async coroutine, potentially reading stale data
from the shared LCObjsLister after it had advanced. Now all rules
are updated before spawning to capture the correct lister state.

rgw/lc: reuse prefetched object tags across lifecycle filter

Prefetch tags once per object and pass them into LCOpRule, letting
the tag filter reuse the cached set and skip tag-based rules early
when tags are absent or mismatched.

Signed-off-by: Matthew N. Heler <[email protected]>
Signed-off-by: Matt Benjamin <[email protected]>
(cherry picked from commit 3bb2e52509feb6c219517a9ea73daeeaff68c203)
Signed-off-by: Matt Benjamin <[email protected]>
@mattbenjamin
mattbenjamin requested a review from cbodley March 2, 2026 19:14
@mattbenjamin
mattbenjamin requested a review from a team as a code owner March 2, 2026 19:14
@github-actions github-actions Bot added this to the tentacle milestone Mar 2, 2026
@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown

Config Diff Tool Output

+ added: rgw_lc_ordered_list_threshold (rgw.yaml.in)
+ added: rgw_lc_list_cnt (rgw.yaml.in)

The above configuration changes are found in the PR. Please update the relevant release documentation if necessary.
Ignore this comment if docs are already updated. To make the "Check ceph config changes" CI check pass, please comment /config check ok and re-run the test.

@mattbenjamin

Copy link
Copy Markdown
Contributor Author

/config check ok

@mattbenjamin

Copy link
Copy Markdown
Contributor Author

Check ceph config changes

@cbodley

cbodley commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

(cherry picked from commit 3bb2e52509feb6c219517a9ea73daeeaff68c203)

i didn't spot any problems with the contents of the backport, but if this is intended to go upstream please cherry-pick from a commit that exists on main and document the Conflicts: in the commit message (https://github.com/ceph/ceph/blob/main/SubmittingPatches-backports.rst#cherry-picking-rules)

@batrick

batrick commented Apr 28, 2026

Copy link
Copy Markdown
Member

This PR has been identified as desirable for v20.2.2.

Please make sure this PR:

  • is rebased
  • passes CI tests
  • cross-references backport tracker tickets properly

When you believe it's ready for consideration, please add the https://github.com/ceph/ceph/labels/pdonnell-tentacle-RFA label to this PR.

@anrao19

anrao19 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

pr approved by @ivancich more details https://tracker.ceph.com/issues/76365.
@mattbenjamin, if no further testing is needed, then pr can be merged

@jmundack

jmundack commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Can we add in the usual details like tracker info etc to better understand what the change is and why we are doing it please?

@mheler

mheler commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

I wasn't sure this was going to make a tentacle release. lgtm, however I wonder if we should also be backporting the co-routine work for lc as well?

@mheler
mheler self-requested a review June 1, 2026 12:03
@ivancich

ivancich commented Jun 2, 2026

Copy link
Copy Markdown
Member

@mattbenjamin This passed testing. @cbodley requested some bookkeeping in a comment above.

@jmundack jmundack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we update the title/description to clearly summarize the changes based on SubmittingPatches.rst

@mheler mheler changed the title Wip tentacle lcprefix tentacle: rgw/lc: group prefix rules and support ordered listing for lifecycle processing Jun 15, 2026
@mheler

mheler commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Can we update the title/description to clearly summarize the changes based on SubmittingPatches.rst

@jmundack I went ahead and updated the PR, this should resolve the concerns.

@batrick batrick added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 11, 2026
@github-actions github-actions Bot removed the releng-audit-fail Release engineering: failed backport verification audit. label Jul 11, 2026
@batrick batrick added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 11, 2026
@github-actions github-actions Bot removed the releng-audit-fail Release engineering: failed backport verification audit. label Jul 11, 2026
@batrick batrick added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 11, 2026
@github-actions github-actions Bot added releng-audit-fail Release engineering: failed backport verification audit. and removed releng-audit-fail Release engineering: failed backport verification audit. labels Jul 11, 2026
@batrick batrick added the releng-audit-queue Release engineering: queued for backport verification audit. label Jul 13, 2026
@github-actions github-actions Bot added releng-audit-fail Release engineering: failed backport verification audit. and removed releng-audit-queue Release engineering: queued for backport verification audit. releng-audit-fail Release engineering: failed backport verification audit. labels Jul 13, 2026
@batrick batrick added the releng-audit-queue Release engineering: queued for backport verification audit. label Jul 14, 2026
@github-actions github-actions Bot added releng-audit-fail Release engineering: failed backport verification audit. and removed releng-audit-queue Release engineering: queued for backport verification audit. releng-audit-fail Release engineering: failed backport verification audit. labels Jul 14, 2026
@batrick

batrick commented Jul 14, 2026

Copy link
Copy Markdown
Member

(cherry picked from commit 3bb2e52509feb6c219517a9ea73daeeaff68c203)

i didn't spot any problems with the contents of the backport, but if this is intended to go upstream please cherry-pick from a commit that exists on main and document the Conflicts: in the commit message (https://github.com/ceph/ceph/blob/main/SubmittingPatches-backports.rst#cherry-picking-rules)

This is still a problem. Not merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common config-change releng-audit-fail Release engineering: failed backport verification audit. rgw

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants