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

Yield policy for batch-inserts should be the same as for batch-updates/deletes

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.1, 2.7.0
    • Affects Version/s: 2.6.0-rc3
    • Component/s: Write Ops
    • ALL

      Issue Status as of April 16, 2014

      ISSUE SUMMARY
      Batch inserts can potentially yield after each single insert. This can negatively impact performance and is inconsistent with the yield policy of batch updates and deletes, which check less frequently.

      USER IMPACT
      Bulk insert tasks have a noticeable performance penalty compared to previous versions of MongoDB.

      WORKAROUNDS
      An older version of the driver that does not use the write commands is unaffected by this issue and can be used as a workaround with MongoDB 2.6.0.

      RESOLUTION
      Changing the yielding policy to the same as updates/deletes (allow yields less frequently) improves insert performance significantly (by ~28% in internal tests).

      AFFECTED VERSIONS
      Version 2.6.0 is affected by this bug.

      PATCHES
      The patch is included in the 2.6.1 production release.

      Original description

      For batch inserts, we were checking to yield after each insert. Batch updates/deletes only check every 100 operations, so batch inserts should be changed to match.

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            alvin Alvin Richards (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: