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)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.7.0, 4.4.5
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.4
    • Sprint:
      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
    • Linked BF Score:
      38

      Description

      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).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dianna.hohensee Dianna Hohensee
              Reporter:
              dianna.hohensee Dianna Hohensee
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: