If I use mongorestore with -- numInsertionWorkersPerCollection > 1 for oplogreplay, it does not bring any performance improvement.I have a 8 core machine with 64 GB RAM and my complete oplog size is around 1 GB (around 1 million request on same collection). So I don't think hardware is the limitation here. Kindly let me know what could be the reason behind it.

Basically, I was comparing the mongorestore with sync (which is used to update oplogs on secondary). In case of sync, we have default 16 workers which can apply the oplogs concurrently and I was hoping I can do same with mongorestore too.

1

There are 1 answers

5
JJussi On BEST ANSWER

numInsertionWorkersPerCollection works only when inserting data, not replaying opLog.

Looking from mongorestore source code, oplogReplay is single thread, so parallel replay don't work.