Repository navigation
rgw: group lifecycle versioned deletes to reduce OLH contention - #67700
Conversation
|
This is awesome! Can we add a tracker? Abd potentially backport this to tentacle and squid?, Also - is there some unit testing we can do? if not - integration tests? |
@jmundack A tracker isn't a bad idea, but this is largely a code refactoring for performance reasons not really a bug or a feature. As for a backport to Tentacle or Squid, that will be difficult considering this work relies on #66367 and #63762 Existing qa tests and s3-tests already cover the testing scenarios of deleting multiple versions of an object. |
|
@mheler nice. Could you share the speedups with the default debug levels -- I'm curious if debug 50 is so expensive that we aren't seeing the true speedup yet. (Amdahl's Law) |
mattbenjamin
left a comment
There was a problem hiding this comment.
This looks fine to me, I'd like Adam or Casey to review as it's mostly spawn/async throttle logic.
|
pr testing is in progress .. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
Move the OLH-aware dispatch logic out of RGWDeleteMultiObj into a standalone rgw::multi_delete::dispatch() so lifecycle expiration can group versioned deletes of the same key and skip redundant OLH updates. Signed-off-by: Matthew N. Heler <[email protected]>
When multiple versions of the same key expire together, each delete does a read-modify-write of the OLH on the same bucket index shard. Buffer versions of the same key during listing and flush on key change. Groups with multiple versions get pre-evaluated, then hard deletes go through rgw::multi_delete::dispatch() which skips OLH updates on all but the last delete. LCOpRule::process() is split into evaluate() and execute() to support this two-phase pattern. Non-versioned buckets and single-version groups are unchanged. Signed-off-by: Matthew N. Heler <[email protected]>
29ca43d to
51a4d6e
Compare
pr testing completed : https://tracker.ceph.com/issues/76520 , and approved by @ivancich. |
|
jenkins test make check |
When lifecycle expires several versions of the same key, each delete does a read-modify-write of the OLH. Since they all hit the same bucket index shard, these updates contend with each other and only the final result matters.
This pulls the OLH grouping logic out of multi-delete into rgw::multi_delete::dispatch() and reuses it in lifecycle expiration. Versions of the same key are buffered during listing, and all but the last delete skip the OLH update.
No change in behavior for non-versioned buckets or keys with a single version.
Testing with 100k keys (distribution: 45% x1 version, 25% x2, 15% x3, 10% x4, 5% x9) and 128 LC workers, lifecycle processing dropped from 6m43s to 3m23s — roughly a 50% reduction in wall time.
Baseline
This PR
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.