-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
(copied to CRM)
As part of TOOLS-1956 we removed the byte limit on batch sizes in the BufferedBulkInserter. (See mtc and tools.)
This means each batch of the BufferedBulkInserter can hold up to ~16 GB of data before it gets flushed. The theoretical maximum of data that can be stored in BufferedBulkInserter's in mongorestore is ~16 GB * NumParallelCollections * NumInsertionWorkers. This is ~64 GB by default.
This can have a severe impact on performance, even for average document sizes of 1-2 MB.
We should limit batches to 48MB. The BufferedBulkInserter will flush its batch whenever the document count reaches the batchSize OR the total size of documents in the batch reaches 48MB.
The go driver splits batches over 48MB so there is no benefit to having batches larger than this.
Additionally, this will provide a limit for the size of the sync.Pool in TOOLS-1856.
- is duplicated by
-
TOOLS-2372 BufferedBulkInserter doesn't limit memory usage before flush
- Closed
-
TOOLS-2977 `mongorestore` shall allow "low RAM consumption" monde/option
- Closed
- is related to
-
TOOLS-1856 use a memory pool in mongorestore
- Accepted
-
TOOLS-1956 Add Bulk Upsert and increase batch size limit
- Closed
-
TOOLS-2839 Mongorestore high memory usage after upgrade from 3.6 to 4.2
- Closed
- links to