-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Bulk API, Performance
-
None
The TestSmallDocBulkInsert task of the driver benchmarks reveals an inefficiency: as you call mongoc_bulk_operation_insert all docs are appended to the same buffer. In mongoc_bulk_operation_execute, those catenated documents are then split into batches of 1000, the batches have to be copied into "insert" command documents before they're sent.
The simplest fix is to pre-split batches: when the current batch has 1000 documents, mongoc_bulk_operation_insert should start a new one.
Same for updates and deletes.
A bulk op can be constructed before the driver has selected a server to send it to, or before the driver has connected at all, so the server's maxWriteBatchSize isn't known. Assume 1000 for now.
- is related to
-
CDRIVER-1212 C Driver Performance Benchmarking
- Closed
- related to
-
CDRIVER-2259 Respect maxWriteBatchSize
- Closed