I am trying to import 10 billion records. Started tested with importing 1 billion records. Import time getting worst as the records gets inserted. Here are configurations and stats.
Mongo db version - 3.4
Documents - 1226592923
Routers(m4.xlarge) 2
Config 3
Nodes(i3.large,15GB nvme ssd) Import time(hrs)
5 14:30:00
10 8:10:00
Each Document has around 7 fields. Shard key is on 3 fields. Followed all the recommendations at https://docs.mongodb.com/v3.4/reference/ulimit/#recommended-ulimit-settings.
Import options
--writeConcern '{ w: 0, j: false }'
--numInsertionWorkers 8
Even tried disabling journal(--nojournal
), but no much difference.
Not sure if this is the expected import time. Or is the way I can do anything else to improve ingestion rate?