Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-46826

Instantiate the JournalFlusher thread for ephemeral engines and when non-durable (nojournal=true)

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0, 4.4.5
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • v4.4
    • Execution Team 2020-03-23, Execution Team 2020-04-06, Execution Team 2020-04-20, Execution Team 2020-05-04, Execution Team 2020-05-18, Execution Team 2020-06-01, Execution Team 2020-06-15, Execution Team 2020-06-29, Execution Team 2020-09-07
    • 38

      Always create the JournalFlusher, regardless of ephemeral or non-durable storage engine settings, because using it to wait for write concern should be a performance gain for all settings and also simplifies the logic.

      Today we skip creating the JournalFlusher thread for both ephemeral or non-durable (nojournal=true) storage engine settings.
      https://github.com/mongodb/mongo/blob/db3a17bbfe2e265722ed88df961e79f3e1a68067/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L989-L993

      Originally, the JournalFlusher was purely a periodically running task. However, recently, that changed. The JournalFlusher is now a periodic task that can also be pinged for an immediate run.
      (Old in v4.2)
      https://github.com/mongodb/mongo/blob/e329dd322df4a226b143031c99b5f943d3a9be4a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L251
      (New in v4.4)
      https://github.com/mongodb/mongo/blob/db3a17bbfe2e265722ed88df961e79f3e1a68067/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L305-L307

      Moving the write_concern.cpp waitUntilDurable calls onto the JournalFlusher thread via waitForJournalFlush has been a big performance win. Currently, we use logic in waitForJournalFlush to skip the JournalFlusher thread when it doesn’t exist and instead call waitUntilDurable directly.
      https://github.com/mongodb/mongo/blob/db3a17bbfe2e265722ed88df961e79f3e1a68067/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp#L2377-L2383

      We would want to override the periodical functionality of the JournalFlusher thread when ephemeral or !durable, I think, and make it purely run when requested. Taking checkpoints so frequently for non-durable (nojournal) might slow down the system; and ephemeral only updates the JournalListener (durable timestamp).

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: