Repository navigation
Conversation
When a bucket index shard had many contiguous delete markers, a single bucket listing request could cause huge read amplification on the backend because RGW needed to iteratively loop through all of the delete markers in order to find at least one listable entry to sort among other shards and return a response to the client. In extreme cases, long latencies due to excessive iteration led to client timeouts and client retries, which compounded impact on cluster performance. The AWS S3 specification does not make any promises about the number of entries that will be returned and claims that continuation tokens are obfuscated and not real keys. This permits us to workaround the aforementioned problem by returning zero keys when excessive iteration is required, advancing the continuation token to a marker associated with an un-listable entry, and letting the client drive continued iteration with subsequent requests. Fixes: https://tracker.ceph.com/issues/64185 Signed-off-by: Cory Snyder <[email protected]>
…progress with many non-current object versions Signed-off-by: Cory Snyder <[email protected]>
This ensures that clients can make forwards progress when listing a bucket that has many non-current object versions. Signed-off-by: Cory Snyder <[email protected]>
…rough contiguous delete markers in versioned bucket Signed-off-by: Cory Snyder <[email protected]>
a706bdf to
ef7d835
Compare
cbodley
left a comment
There was a problem hiding this comment.
some initial comments. sorry for the delay. i'll need help from @ivancich to review the changes to the rados list-objects algorithm
adding this requires_nonempty_result flag essentially means we'd have to maintain two versions of the listing algorithm, one of which doesn't resolve the issue of timeouts
ultimately i prefer the approach that sends writespace characters to avoid request timeouts while rgw keeps working. you mentioned in slack that we could layer those changes on top of this work. maybe you could start by summarizing a design for that? for example, what would the Bucket::list() interface look like?
| if (r == RGWBIAdvanceAndRetryError) { | ||
| r = 0; | ||
| } |
There was a problem hiding this comment.
it looks like this change would prevent us from ever entering the if (r == RGWBIAdvanceAndRetryError) { block below that tracks retry_objs
that's the intent, right? that we don't do retries at this level, but return back up to RGWRados::Bucket::List?
if so, can we clean up the rest of this stuff? are there any other changes from 5d28307 that should be reverted here?
There was a problem hiding this comment.
Yeah I'll look at this again and do some more cleanup.
|
We discussed this in the RGW standup today. I'm going to update this PR so that the default behavior is to return whitespace and keep requests from timing out when advance and retry errors are causing excessive iteration. I'm also going to add a config parameter to allow the return of zero entries to be enabled as an alternative. cc. @ivancich |
|
one difference between these two strategies is that the 'return zero entries' strategy has to take the minimum of all shard markers to return as NextContinuationToken. on the next request, all shards will restart listing from that position when listing returns back to RGWListBucket for the whitespace strategy, it would be ideal if we preserved all of those shard markers so the next call can resume listing from those we might consider introducing a |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
ping @cfsnyder |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
When a bucket index shard had many contiguous delete markers, a single bucket listing request could cause huge read amplification on the backend because RGW needed to iteratively loop through all of the delete markers in order to find at least one listable entry to sort among other shards and return a response to the client. In extreme cases, long latencies due to excessive iteration led to client timeouts and client retries, which compounded impact on cluster performance.
The AWS S3 specification does not make any promises about the number of entries that will be returned
and claims that continuation tokens are obfuscated and not real keys. This permits us to workaround the aforementioned problem by returning zero keys when excessive iteration is required, advancing the continuation token to a marker associated with an un-listable entry, and letting the client drive continued iteration with subsequent requests.
Fixes: https://tracker.ceph.com/issues/64185
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 retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e