Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-2783

Mongorestore uses huge amount of RAM

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 100.3.1
    • Affects Version/s: 100.2.1
    • Component/s: mongorestore
    • Labels:
      None
    • Environment:
      Windows 10 Pro 64-bit (10.0, Build 17763)

      Problem Description

      When restoring a backup made with mongodump with an all in all size of ~50GB, mongorestore is going to use up to 76GB of system memory. If run on a system with less memory, the system freezes.

      Steps to Reproduce

      1. Have a mongo database with one collection with a size > 40GB
      2. Make a dump with mongodump (e.g. mongodump --host 127.0.0.1:27017 --db MyDB --authenticationDatabase admin -u MyUser -p MyPassword-o F:\
      3. Do a restore (e.g. mongorestore.exe -host 127.0.0.1:27017 --db MyDB-drop --numInsertionWorkersPerCollection=10 --authenticationDatabase admin -u MyUser-p MyPassword F:\MyDB

      Expected Results

      Restore succeedes if started from any moderate performant device.

      Actual Results

      Restore is possible from a Cloud VM with 80GB of RAM. If run on a system with less memory, the system freezes.

      Additional Notes

      MongoDB Version

      { "_id" : "featureCompatibilityVersion", "version" : "4.2" }

      "_id" : "authSchema",
      "currentVersion" : 5
      }

            Assignee:
            ryan.chipman@mongodb.com Ryan Chipman
            Reporter:
            niklas.klein@geutebrueck.com Niklas Klein
            Tim Fogarty
            Votes:
            3 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: