ExportXMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      On MongoDB 8.0+ (verified against 9.0.0-alpha0, master), when featureFlagReduceMajorityWriteLatency is enabled, a dedicated OplogWriter thread writes fetched oplog entries into the local rs.oplog collection before handing them off to the oplog applier. In steady-state replication this writer runs on a single thread (OplogWriter-0). Under high-throughput / large-document workloads this single thread becomes the replication bottleneck: it saturates one CPU core while the rest of the machine (and the applier threads) sit idle, capping secondary write throughput and, in turn, the whole replica set's sustainable write rate.

      This proposal adds a new startup-only server parameter, oplogWriterThreadCount, that lets the steady-state OplogWriter write each oplog batch in parallel on a dedicated worker pool, while fully preserving the Reduce-Majority-Write-Latency design (the feature flag stays on) and without contending with the oplog applier's thread pool.

      In our benchmarks this raised secondary-bound insert throughput from ~5.2K ops/s to ~8.6K ops/s (+65%), moving the bottleneck off the single oplog writer thread.
      Version context. As of 9.0.0-alpha0,

       featureFlagReduceMajorityWriteLatency is still present and is default: true, fcv_gated: false — i.e. the dedicated single-threaded OplogWriter is the default steady-state write path. This proposal targets that default path.

      By the way, I’d like to report an issue: when creating a ticket in MongoDB JIRA, I’m unable to select the issue type. This ticket is actually an improvement / performance optimization, but I cannot choose the appropriate issue type.

        1. image-2026-08-04-17-41-30-511.png
          image-2026-08-04-17-41-30-511.png
          305 kB
        2. image-2026-08-04-17-41-08-194.png
          image-2026-08-04-17-41-08-194.png
          204 kB
        3. image-2026-08-04-17-40-18-869.png
          image-2026-08-04-17-40-18-869.png
          244 kB
        4. image-2026-08-04-17-40-07-848.png
          image-2026-08-04-17-40-07-848.png
          244 kB
        5. image-2026-08-04-17-38-21-041.png
          image-2026-08-04-17-38-21-041.png
          312 kB
        6. image-2026-08-04-17-37-45-140.png
          image-2026-08-04-17-37-45-140.png
          56 kB
        7. image-2026-08-04-17-35-59-366.png
          image-2026-08-04-17-35-59-366.png
          303 kB
        8. image-2026-08-04-17-35-50-277.png
          image-2026-08-04-17-35-50-277.png
          173 kB
        9. image-2026-08-04-17-34-52-867.png
          image-2026-08-04-17-34-52-867.png
          190 kB
        10. image-2026-08-04-17-34-34-430.png
          image-2026-08-04-17-34-34-430.png
          82 kB
        11. image-2026-08-04-17-29-27-695.png
          image-2026-08-04-17-29-27-695.png
          201 kB
        12. image-2026-08-04-17-29-12-810.png
          image-2026-08-04-17-29-12-810.png
          326 kB

            Assignee:
            Unassigned
            Reporter:
            y yz (EXT)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: