-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: GridFS, Performance
-
None
Consider using insert_many to upload GridFS chunks for better performance.
Context
While talking to james.kovacs@mongodb.com about CSHARP-4900 he mentioned that the .NET driver uses insert_many to insert into the chunks collection. That was surprising to me since PyMongo uses insert_one. Using insert_many could improve the GridFS upload performance and this could explain why our GridFS upload throughput is much lower than our download throughput.
Pitfalls
We need to take care not to inflate the data stream too much because we don't want to bloat memory usage. We'd probably want to limit the insert_many batch to less than the max OP_MSG message size.
- is related to
-
DRIVERS-2848 Use insertMany to upload GridFS chunks for better performance
- Backlog
- related to
-
CSHARP-4900 Uploading a duplicate file larger than the original one causes errors in downloading the original file
- Closed
-
PHPLIB-1376 Use insertMany to upload GridFS chunks for better performance
- Blocked
-
PYTHON-1721 GridFS should use a cursor to read all chunks in a file
- Closed
-
MOTOR-1240 TestGridfs::* synchro tests failing on Motor
- Closed