[SERVER-68442] Make mongos capture read/write latency for a collection Created: 29/Jul/22  Updated: 09/Nov/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Garaudy Etienne
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-46478 Add opLatencies to mongoS serverStatus Closed
Participants:

 Description   

Mongod captures the latency metrics of reads and writes to a collection and exposes them via $collStats. However, mongos doesn't do that. Running $collStats against a mongos returns the latencyStats for each shard in a separate document along with the other stats. Similar to SERVER-46478, we should make mongos capture per-collection latency metrics to allow for performance analysis after (re)sharding and other cases.



 Comments   
Comment by Garaudy Etienne [ 11/Oct/22 ]

From Cailin: "I spent several hours today failing to notice that one mongos (out of 36) in a sharded cluster was unhealthy and causing substantial application slowness. Given the metrics available, the only metric that did indicate "unhealthy" was virtual memory. But... I didn't think to look at virtual memory for all 36 mongos. If there had been opLatency metrics available for the mongos, I feel confident I would have figured this out sooner."

Generated at Thu Feb 08 06:10:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.