Repository navigation
EC Direct Reads - #66459
EC Direct Reads#66459
Conversation
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
2c28618 to
52bc883
Compare
| @@ -1393,6 +1393,8 @@ inline namespace v14_2_0 { | |||
| int application_metadata_list(const std::string& app_name, | |||
There was a problem hiding this comment.
NOTE: This is from a different PR.
|
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. |
52bc883 to
8fe5c77
Compare
SplitOps will add support to split replica reads. This allows the user to specify the threshold at which they are split. The default is currently set at 256k. This is set at a point where we have confidence that split ops will never reduce performance. Development may choose to reduce this default based on performance measurements. Signed-off-by: Alex Ainscow <[email protected]> Signed-off-by: Callum James <[email protected]> Signed-off-by: Jon Bailey <[email protected]>
This statistic counts the number of OPs which have been submitted using the split op mechanism. It allows a user to check how useful this is and performance/development to check that this mechanism is being used in any given application. Signed-off-by: Alex Ainscow <[email protected]>
…tOp decision point. The locking situation in Objecter is complex. When ops are completed whether with success or otherwise, some locks are held. For split ops, this is particularly complex, since multiple sessions are involved in the completion. To avoid all these deadlock issues, splitOps choose to schedule a completion task using asio::post, which can then take the appropriate locks before completing the IO, without risk of deadlock. Usage of this will be added in a refactor of SplitOps. In addition, previously split ops was being calculated immediately as soon as the op was submitted. Here we move the submit down to below the throttling and timeout code. This way we throttle/timeout the original op. Handling the timeout (op_cancel) will be handled in a later commit. As part of this commit we also introduce a SplitOp session. This allows us to keep track of the parent ops while the child ops have been submitted and redrive the correct op(s) when necessary. Signed-off-by: Alex Ainscow <[email protected]> Signed-off-by: Jon Bailey <[email protected]>
This was one big monolithic function which handled the entire reply message. SplitOps needs to re-use parts of this function. The previous split ops commit dealt with one split, but this adds another. Also rename the functions to have a better name. Signed-off-by: Alex Ainscow <[email protected]>
SplitOp calculates the target and set the necessary target OSD itself. This means that calc_target is not required again on first submit of the sub read ops. Signed-off-by: Alex Ainscow <[email protected]>
When an op that has been split is canceled or timed out, all the sub ops need to be canceled. This commit adds a mechanism to map the original op to the sub reads. Signed-off-by: Alex Ainscow <[email protected]>
There are large number of changes in this commit which were found through development and testing of split ops. I have split out all the objecter updates carefully, but since the split op code is not currently used in production, I have not documented every change and made significant refactors/rearrangements. Signed-off-by: Alex Ainscow <[email protected]>
Signed-off-by: Alex Ainscow <[email protected]>
Added optional "-b"/"balanced" flag to the end of read/read2/read3 operations in interactive mode, to make them balanced reads. Balanced read percentage is not used in interactive mode. Add command line argument to specify percentage of read ops that should use the balanced reads flag. Default is 100%. Signed-off-by: Matty Williams <[email protected]> Signed-off-by: Alex Ainscow <[email protected]> Signed-off-by: Jon Bailey <[email protected]>
Fixed a bug where reference_sub_read was set to -1 when non-read operations were processed before read operations, causing crashes when accessing sub_reads[reference_sub_read]. Changes: 1. Added init_reference_sub_read() virtual method to initialize reference_sub_read early, after _calc_target() populates the acting set but before processing any operations. 2. ECSplitOp::init_reference_sub_read(): Sets reference_sub_read to the acting index of the primary shard by performing a reverse lookup. 3. ReplicaSplitOp::init_reference_sub_read(): Counts valid OSDs and picks a random acting index for load balancing. 4. Simplified init_read() in both classes by removing duplicate logic that previously set reference_sub_read during read processing. 5. Added safety check in SplitOp::init() to ensure the reference_sub_read entry exists in sub_reads before accessing it for non-read operations. The fix ensures reference_sub_read is always set before any operations are processed, preventing the crash that occurred when STAT, GETXATTR, or other non-read operations appeared before READ operations in the operation list. Tested with split_op_cxx.cc test suite: 33/35 tests pass (2 test expectation issues unrelated to the core bug fix). Signed-off-by: Alex Ainscow <[email protected]>
Previously the librados tests were each restricted to a particular configuration. Here we parameterize to execute against multiple configurations of pool and fix the necessary create/clean up work. Signed-off-by: Alex Ainscow <[email protected]> Signed-off-by: Jon Bailey <[email protected]>
…ey are tested Signed-off-by: Jon Bailey <[email protected]>
…_command The do_mon_command() method was calling the mocked mon_command() which has a default action that calls do_mon_command(), creating an infinite recursion that caused a segmentation fault due to stack overflow. Fixed by calling TestRadosClient::mon_command() (the base class implementation) instead of the mocked version. This resolves the segfault in unittest_librbd when running the run-rbd-unit-tests.sh script. Signed-off-by: Alex Ainscow <[email protected]>
Signed-off-by: Alex Ainscow <[email protected]> Signed-off-by: Callum James <[email protected]>
Signed-off-by: Alex Ainscow <[email protected]> Signed-off-by: Callum James <[email protected]>
Signed-off-by: Callum James <[email protected]>
Previously the test_rados_tool.sh test was dependant on flag ordering. This mean if you added a new flag after full_quota (such as split_reads or ec_optimizations), this could break the teuthology test if we try to test with these flags on. We prevent this by changing this condition to use json to ensure we are no longer depend on the order of the flags which the default command line output gives. This also adds a check to ensure the pool name matches what we are working on, to ensure we don't get false-positives if we happened to have other pools. Signed-off-by: Jon Bailey <[email protected]>
|
jenkins test dashboard cephadm |
batrick
left a comment
There was a problem hiding this comment.
I saw this was approved through QA. I am adding an empty request changes review so I can check it before merge.
batrick
left a comment
There was a problem hiding this comment.
I'm fine with this from a Umbrella release perspective. I've not analyzed any of the technical details in depth.
However, I do want to comment that the lack of dev docs makes me
| @@ -1171,7 +1171,7 @@ COMMAND("osd pool rename " | |||
| "rename <srcpool> to <destpool>", "osd", "rw") | |||
| COMMAND("osd pool get " | |||
| "name=pool,type=CephPoolname " | |||
| "name=var,type=CephChoices,strings=size|min_size|pg_num|pgp_num|crush_rule|hashpspool|nodelete|nopgchange|nosizechange|write_fadvise_dontneed|noscrub|nodeep-scrub|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|use_gmt_hitset|target_max_objects|target_max_bytes|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|erasure_code_profile|min_read_recency_for_promote|all|min_write_recency_for_promote|fast_read|hit_set_grade_decay_rate|hit_set_search_last_n|scrub_min_interval|scrub_max_interval|deep_scrub_interval|recovery_priority|recovery_op_priority|scrub_priority|compression_mode|compression_algorithm|compression_required_ratio|compression_max_blob_size|compression_min_blob_size|csum_type|csum_min_block|csum_max_block|allow_ec_overwrites|fingerprint_algorithm|pg_autoscale_mode|pg_autoscale_bias|pg_num_min|pg_num_max|target_size_bytes|target_size_ratio|dedup_tier|dedup_chunk_algorithm|dedup_cdc_chunk_size|eio|bulk|read_ratio|pct_update_delay|allow_ec_optimizations", | |||
| "name=var,type=CephChoices,strings=size|min_size|pg_num|pgp_num|crush_rule|hashpspool|nodelete|nopgchange|nosizechange|write_fadvise_dontneed|noscrub|nodeep-scrub|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|use_gmt_hitset|target_max_objects|target_max_bytes|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|erasure_code_profile|min_read_recency_for_promote|all|min_write_recency_for_promote|fast_read|hit_set_grade_decay_rate|hit_set_search_last_n|scrub_min_interval|scrub_max_interval|deep_scrub_interval|recovery_priority|recovery_op_priority|scrub_priority|compression_mode|compression_algorithm|compression_required_ratio|compression_max_blob_size|compression_min_blob_size|csum_type|csum_min_block|csum_max_block|allow_ec_overwrites|fingerprint_algorithm|pg_autoscale_mode|pg_autoscale_bias|pg_num_min|pg_num_max|target_size_bytes|target_size_ratio|dedup_tier|dedup_chunk_algorithm|dedup_cdc_chunk_size|eio|bulk|read_ratio|pct_update_delay|allow_ec_optimizations|ec_data_shard_count|ec_coding_shard_count", | |||
There was a problem hiding this comment.
This will conflict as soon as #66726 is merged.
I suggest that we end future instance of that by breaking each setting into a separate line. It's a recipe for regressions if someone accidentally removes a new setting during conflict resolution.
|
|
||
| if (osdmap.require_osd_release < ceph_release_t::umbrella && | ||
| tmp.require_osd_release >= ceph_release_t::umbrella) { | ||
| dout(10) << __func__ << " first umbrella+ epoch" << dendl; |
There was a problem hiding this comment.
I think whichever is chosen, we should do these implicit OSDMap upgrades in the same location. Otherwise it's prone to mistakes/confusion.
There was a problem hiding this comment.
Agree will fix 66726 to follow convention
| bool force; | ||
| cmd_getval(cmdmap, "yes_i_really_mean_it", force); | ||
| if (!force) { | ||
| ss << "This is a development tool and should not be used in production."; |
There was a problem hiding this comment.
Have you not seen the tee-shirts people wear at Cephalocon?
This was added in an earlier PR. |
Design documentation was in a previous PR - see https://docs.ceph.com/en/latest/dev/osd_internals/erasure_coding/direct_reads/ for all the design documentation for this feature. However I agree that we could improve the user documentation in a few areas: https://docs.ceph.com/en/latest/man/8/rbd/ - see read_from_replica @JonBailey1993 can you raise another PR to address doc updates on these pages to explain that this setting now applies to EC pools as well and that it can significantly improve performance There sadly isn't any user documentation for the conf settings rados_replica_read_policy / rados_replica_read_policy_on_objclass (beyond the .conf file) although they are advanced config options and our teuthology test results suggest there are still some base code issues to fix before we start suggesting users turn this on. When these issues are fixed perhaps we should add a new section to the docs - perhaps a "direct, balanced and localized reads" section as a sub topic under https://docs.ceph.com/en/latest/rados/configuration/ , it would also make sense to reference this section from https://docs.ceph.com/en/latest/rados/operations/stretch-mode/ as the main use case for localized reads is when using a stretch cluster. Longer term I'd like to get to a point where balanced reads can be turned on by default for all protocols, as far as performance is concerned we are in a position where balanced reads will always result in the same or much better performance, stability wise I think that there are still corner case bugs when using rados_replica_read_policy (but not when using the more selective rbd or cephfs options) that mean we aren't ready to make this change yet. |
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker |
| } | ||
|
|
||
| void set_shard_mapping(std::vector<shard_id_t> && mapping) { | ||
| shard_mapping = mapping; |
There was a problem hiding this comment.
What's the point of passing a rvalue reference to this method, when the method body allocates a new copy of the std::vector? Did you forget std::move() here?
This is the final PR (other than bug fixes). The main features:
Fixes: https://tracker.ceph.com/issues/74061
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.