Hi Chetan
If I use mongorestore with numInsertionWorkersPerCollection > 1, it doesn’t bring any performance improvement.
From my understanding, you are trying to do mongorestore --oplogReplay --numInsertionWorkersPerCollection x
. Is this correct?
The setting --numInsertionWorkersPerCollection
will affect how many goroutines are used in restoring a regular collection (https://github.com/mongodb/mongo-tools/blob/v3.4/mongorestore/restore.go#L271-L274)
In contrast, that setting doesn’t have an effect on restoring the oplog when you specify --oplogReplay
. This is because mongorestore
restores the oplog in a serial manner, since the oplog is not a regular collection (https://github.com/mongodb/mongo-tools/blob/v3.4/mongorestore/mongorestore.go#L476-L482).
Note that I am assuming you are using mongorestore
version 3.4.
Best regards,
Kevin