Open
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. |
Contributor
Author
|
/config check ok |
Contributor
Author
|
Check ceph config changes |
Contributor
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.