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

Limit memory usage for bulkWrite (mongod)

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • None
    • None
    • Replication
    • Fully Compatible
    • Repl 2023-05-29, Repl 2023-06-12, Repl 2023-09-04, Repl 2023-09-18

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: