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.