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
    • 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
      }

        1. 2020-12-08 09_58_42-mRemoteNG - confCons.xml - 20.67.42.49.png
          263 kB
          Niklas Klein
        2. 2020-12-08 10_16_58-mRemoteNG - confCons.xml - 20.67.42.49.png
          348 kB
          Niklas Klein
        3. 2020-12-08 10_51_05-mRemoteNG - confCons.xml - 20.67.42.49.png
          58 kB
          Niklas Klein
        4. 2020-12-08 10_52_06-mRemoteNG - confCons.xml - 20.67.42.49.png
          24 kB
          Niklas Klein
        5. image-2020-12-09-09-56-31-058.png
          56 kB
          Niklas Klein
        6. image-2021-01-05-14-53-58-644.png
          314 kB
          Niklas Klein
        7. screenshot-1.png
          78 kB
          Niklas Klein

            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: