MongoDB cache-pressure monitor and oldest-transaction aborts (8.2 and later)
Parent: WiredTiger cache eviction and dirty ratio · Published reference · snapshot 2026-10-31
↓ Facts as markdownall context files
Source-anchored research for MongoDB cache-pressure monitor and oldest-transaction aborts (8.2 and later). Run status: COMPLETED.
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.
Structure and components
- The inspected v8.2 source contains PeriodicThreadToRollbackUnderCachePressure, but its job returns immediately unless gStorageEngineInterruptibility is enabled. The corresponding featureFlagStorageEngineInterruptibility defaults to false and is not FCV-gated. Code presence therefore does not establish that ordinary 8.2 deployments run this abort policy. (high confidence) (verified as of 2026-10-30) [source]
How it works
- WiredTigerCachePressureMonitor checks eviction-trigger crossings, elapsed time without commit progress, and application-thread eviction time. Its documented pressure decision combines these signals, so a high dirty ratio by itself is insufficient to identify this monitor firing. (low confidence) (verified as of 2026-10-30) [source]
- The periodic MongoDB worker asks the storage engine whether cache pressure exists and targets oldest transactions for rollback. Its v8.2 implementation rechecks pressure before each kill attempt and stops the batch when pressure clears or its estimated-byte or successful-kill budget is exhausted. (high confidence) (verified as of 2026-10-30) [source]
- WiredTiger supports interrupting recruited eviction through WT_EVENT_HANDLER.handle_general for WT_EVENT_EVICTION. The integration README explains that this lets cache-pressure and idle-session aborts roll back active transactions even when their application threads are performing eviction. (low confidence) (verified as of 2026-10-30) [source]
- The monitor has workload-sensitive tuning for eviction-stall proportion, smoothing, detection window, polling frequency, and abort-batch limits. The README warns that varying read/write ticket counts can cause pressure misdetection; lower smoothing alpha values smooth its view of tickets. (low confidence) [source]
- A MongoDB engineering experiment removing the updates-eviction dimension found performance regressions despite dirty bytes staying below the dirty trigger. Its author explicitly identifies a simultaneous cache-pressure-monitor change as a confound; this is experimental evidence against dirty-ratio-only reasoning, not a production incident or an isolated monitor benchmark. (low confidence) (verified as of 2026-06-04) [source]
- In the v8.2 worker's runtime-period observer, setting the period to zero stops the periodic job; a subsequent nonzero value restarts it when the previous period was zero. This is implementation evidence, not a recommendation to disable cache-pressure recovery. (low confidence) (verified as of 2026-10-30) [source]
Problems, failure modes and limitations
- MinervaDB recommends keeping transactions short because oldest transactions are targeted under cache pressure. Netdata independently recommends smaller transaction batches that commit more frequently, while warning that partial completion can require application-level idempotency. (medium confidence) [source]
Facts and statements
- The public manual identifies cachePressureQueryPeriodMilliseconds as new in MongoDB 8.3. It applies to mongod, defaults to 1000 milliseconds, and controls the interval between cache-pressure checks; the parameter reference permits changes at startup and runtime. (high confidence) (verified as of 2026-10-14) [source]
- cachePressureQueryPeriodMilliseconds defaults to 1000 milliseconds and is configurable at startup and runtime. The current IDL agrees with the documented default and allows nonnegative values; do not assume identical defaults or support across all 8.2 builds. (high confidence) (verified as of 2026-10-27) [source]
- For diagnosis, correlate transaction-abort events with cache occupancy, dirty bytes, application-thread eviction activity, and transaction age/open-state information. MinervaDB supplies an abort/cache evidence pack, while Netdata supplies transaction-state and cache checks; these are observational diagnostics, not a specification of the monitor's thresholds. (medium confidence) [source]
- In the v8.2 worker, the memory-clear budget interprets positive values as MiB, negative values as a percentage of the storage-engine cache, and zero as effectively unlimited; its loop also enforces a separate successful-session-kill budget. (low confidence) (verified as of 2026-10-30) [source]
- The v8.2 worker defines abortOldestTransactions counters for passes, successfulKills, skippedSessions, timedOutKills, and bytesClearedEstimate. The bytes counter is an estimate and the passes counter increments per attempted oldest-transaction selection, so neither should be read as an exact cache-byte reduction or a count of timer firings. (low confidence) (verified as of 2026-10-30) [source]
Children
- No children recorded.