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

Limit memory usage for bulkWrite (mongod)

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Fully Compatible
    • Repl 2023-05-29, Repl 2023-06-12, Repl 2023-09-04, Repl 2023-09-18

      On mongod, bulkWrite uses WorkingSet and QueuedDataStage to queue data and construct cursor response. Memory usage for WorkingSet and QueuedDataStage is unbounded. And they currently do not support spilling to disk. Additionally, we currently build the entire response in memory first without a limit.

      This ticket is to limit the memory usage (e.g. capped at 100MB) for bulkWrite by putting a cap for the size of responses queued.

      The end goal is to limit the memory usage when we build or cache responses for bulkWrite ops. Once this limit is hit, we should stop executing the remaining operations in this bulkWrite.

            Assignee:
            frederic.vitzikam@mongodb.com Frederic Vitzikam (Inactive)
            Reporter:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: