-
Type:
Investigation
-
Resolution: Won't Do
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Tools and Replicator
Original Downstream Change Summary
This change adds the following 5 stream process-level throughput metrics on mongoD:
- metrics.changeStreams.cursor.docsReturned (counter): Shows the cumulative number of returned change events by all change stream cursors.
- metrics.changeStreams.cursor.bytesReturned (counter): Shows the cumulative amount in bytes returned by all change stream cursors.
- metrics.changeStreams.cursor.docsExamined (counter): Shows the cumulative number of scanned oplog entries by all change stream cursors.
- metrics.changeStreams.cursor.bytesRead (counter): Shows the cumulative amount of scanned oplog in bytes by all change stream cursors.
- metrics.changeStreams.cursor.batchesReturned (counter): Shows the cumulative number of batches returned by all change streams.
Description of Linked Ticket
Add change stream specific throughput metrics on mongoD (see project design document section "Decision: Process-Level Change Stream Cursor Metrics / Throughput"):
- metrics.changeStreams.cursor.docsReturned(already exists for query stats)
- metrics.changeStreams.cursor.bytesReturned
- metrics.changeStreams.cursor.docsExamined
- metrics.changeStreams.cursor.bytesRead
- metrics.changeStreams.cursor.batchesReturned(already exists for query stats)
Design notes:
- Check if any of the metrics are already collected in the OpDebug::AdditiveMetrics structure. We may re-use / extend this structure with the missing metrics, unless there are performance regressions or other reasons.
- The process-level metrics must be updated once per aggregate or getMore command execution.
- Incrementing docsReturned, bytesReturned, and batchesReturned should be straight-forward (we inspect batch sizes continuously not to exceed 16MB limit)
- Incrementing docsExamined and bytesExamined can be trickier, because these come from the "classic" find subsystem doing the collection scan. However, it looks like there is docsExamined and bytesRead already in the OpDebug::AdditiveMetrics.
Please feel encouraged to split this ticket into subtasks.
- depends on
-
SERVER-122363 Add change stream process-level throughput metrics on mongoD
-
- Closed
-