[SERVER-58960] Measure the overhead from ShardingWriteRouter on the write codepath Created: 30/Jul/21  Updated: 29/Oct/23  Resolved: 30/Sep/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.0.4, 5.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Luis Osta (Inactive)
Resolution: Fixed Votes: 0
Labels: PM-234-T-perf
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-58961 Reduce the overhead from ReshardingDo... Closed
Problem/Incident
Related
related to SERVER-60388 ShardingWriteRouter GBenchmark Doesn'... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Sharding 2021-10-04
Participants:
Linked BF Score: 70
Story Points: 2

 Description   

This test should be written as a google/benchmark test (see this wiki page and chunk_manager_refresh_bm.cpp as an example).

Outside of the

for (auto keepRunning : state) { ... }

loop, the benchmark should construct a CatalogCache that will return a ChunkManager for the temporary resharding collection which has 60 chunks (to match the number of chunks in ReshardCollectionMixed.yml). It'll additionally need to call CollectionShardingRuntime::setFilteringMetadata() for the source collection with a CollectionMetadata that has reshardingFields present and in a state such that getReshardingKeyIfShouldForwardOps() would return the new shard key pattern.

Within the

for (auto keepRunning : state) { ... }

loop, the benchmark should construct a ReshardingDonorWriteRouter instance and call ReshardingDonorWriteRouter::getDestinedRecipient() for a fixed document. The document should be constructed outside of the loop so that the BSONObjBuilder for it isn't counted in the benchmark.



 Comments   
Comment by Githook User [ 01/Nov/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-58960 Add benchmarks to measure the overhead from ShardingWriteRouter on the write codepath
Branch: v5.0
https://github.com/mongodb/mongo/commit/f9c31646ad3281410ec757222fffdf80867e0bea

Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 30/Sep/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-58960 Add benchmarks to measure the overhead from ShardingWriteRouter on the write codepath
Branch: master
https://github.com/mongodb/mongo/commit/88dc3b889025bdd39405f42eb1e53d759d061786

Generated at Thu Feb 08 05:45:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.