Lock-Free Diagnostic Sampling Engine
Parent: Diagnostic Tool Design · Published reference · snapshot 2026-10-15
↓ Facts as markdownall context files
Depth-first rabbithole dossier for Lock-Free Diagnostic Sampling Engine; source-anchored research pack.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Measurements and reference values
- [low] In MongoDB 9.0, `$queryStats` collects statistics for a sample of 1% of read and write operations by default, with the sampling rate adjustable via `internalQueryStatsSampleRate` and `internalQueryStatsWriteCmdSampleRate` parameters accepting values between 0.0 and 1.0. (verified as of 2026-10-15) Sources: https://www.mongodb.com/docs/manual/reference/operator/aggregation/queryStats.md [source]
- The default `diagnostic.data` folder size is reported as 500 MB in one source and 200 MB in another, with the 500 MB value noted as twice the 200 MB default. Sources: https://www.mongodb.com/docs/manual/administration/full-time-diagnostic-data-capture.md, https://www.percona.com/blog/the-diagnostic-data-mongodb-atlas-doesnt-hand-you [source]
Problems, failure modes and limitations
- [low] The default maximum size for the `diagnostic.data` folder is 500 MB; starting in MongoDB 8.3 the default was increased from 250 MB (500 MB for sharded clusters). MongoDB overwrites older data as the folder approaches this limit. (verified as of 2026-10-15) Sources: https://www.mongodb.com/docs/manual/administration/full-time-diagnostic-data-capture.md [source]
- [low] FTDC data forwarded by OTel or other log shipping pipelines cannot be used for diagnostic purposes. Sources: https://www.mongodb.com/docs/manual/administration/full-time-diagnostic-data-capture.md [source]
- [low] Slow operation log messages include a `queryFramework` field indicating the query engine (`classic` for the classic engine) and a `cpuNanos` field specifying total CPU time in nanoseconds, which is only available on Linux systems. (verified as of 2026-10-15) Sources: https://www.mongodb.com/docs/manual/reference/log-messages.md [source]
Facts and statements
- [high] FTDC (Full Time Diagnostic Data Capture) is enabled by default in MongoDB and writes approximately 5,700 metrics every second into the `diagnostic.data` folder. (verified as of 2026-10-15) Sources: https://www.mongodb.com/docs/manual/administration/full-time-diagnostic-data-capture.md, https://www.percona.com/blog/the-diagnostic-data-mongodb-atlas-doesnt-hand-you [source]
- [low] The `WriterReaderPhaser` writer operations (`writerCriticalSectionEnter`/`Exit`) are wait-free on architectures supporting wait-free atomic increment and lock-free on others. The reader's `flipPhase()` is lock-free with respect to writer calls and may spin-wait for active writer critical sections to complete. Sources: https://raw.githubusercontent.com/HdrHistogram/HdrHistogram/master/src/main/java/org/HdrHistogram/WriterReaderPhaser.java [source]
- [low] The `flipPhase()` operation is fast (a single atomic op) and lock-free with respect to writer critical section enter/exit calls, requiring no actual writer critical section activity to succeed. Sources: https://raw.githubusercontent.com/HdrHistogram/HdrHistogram/master/src/main/java/org/HdrHistogram/WriterReaderPhaser.java [source]
Related concepts
- Diagnostic — is a part of Lock-Free Diagnostic Sampling Engine
- Lock-Free — is a part of Lock-Free Diagnostic Sampling Engine
- Sampling — is a part of Lock-Free Diagnostic Sampling Engine
- Engine — is a part of Lock-Free Diagnostic Sampling Engine
Children
- No children recorded.