Repository navigation
tentacle: rgw/lc: group prefix rules and support ordered listing for lifecycle processing - #67614
mattbenjamin wants to merge 2 commits into
Conversation
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]>
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. |
|
/config check ok |
|
Check ceph config changes |
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 PR has been identified as desirable for v20.2.2. Please make sure this PR:
When you believe it's ready for consideration, please add the https://github.com/ceph/ceph/labels/pdonnell-tentacle-RFA label to this PR. |
|
pr approved by @ivancich more details https://tracker.ceph.com/issues/76365. |
|
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? |
|
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? |
|
@mattbenjamin This passed testing. @cbodley requested some bookkeeping in a comment above. |
jmundack
left a comment
There was a problem hiding this comment.
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. |
This is still a problem. Not merging. |
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.