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

Strange performance characteristics of write ops in shell

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Shell
    • Labels:
      None
    • Operating System:
      ALL

      Description

      Running these two cases shows some unexpectedly huge discrepancy in run time:

      db.user.drop();
      for (var x = 0; x < 10000; x++) {
          db.user.insert({ x: x });
          if (!db.getMongo().useWriteCommands()) {
              db.runCommand({ getLastError: 1 });
          }
      }

      raw smoke.py: 4697 ms
      --use-write-commands: 8640 ms

      db.user.drop();
      var bulk = db.user.initializeUnorderedBulkOp();
      for (var x = 0; x < 10000; x++) {
          bulk.insert({ x: x });
      }
      bulk.execute();

      raw smoke.py: 4769 ms
      --use-write-commands: 305 ms

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              davide.italiano Davide Italiano
              Reporter:
              renctan Randolph Tan
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: