Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6119027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:30:16+00:00 2026-05-23T15:30:16+00:00

I am running a sharded mongodb environment – 3 mongod shards, 1 mongod config,

  • 0

I am running a sharded mongodb environment – 3 mongod shards, 1 mongod config, 1 mongos (no replication).

I want to use mongoimport to import csv data into the database. I have 105million records stored in increments of 500,000 across 210 csv files. I understand that mongoimport is single threaded and I read that I should run multiple mongoimport processes to get better performance. However, I tried that and didn’t get a speed up:

when running 3 mongoimports in parallel, I was getting ~6k inserts/sec per process (so 18k i/s) vs. running 1 mongoimport, I was getting ~20k inserts/sec.

Since these processes were routed through the single mongod config and mongos, I am wondering if this is due to my cluster configuration. My question is, if I set up my cluster configuration differently, will I achieve better mongoimport speeds? Do I want more mongos processes? How many mongoimports processes should I fire off at a time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:30:16+00:00Added an answer on May 23, 2026 at 3:30 pm

    So, the first thing you need to do is “pre-split” your chunks.

    Let’s assume that you have already sharded the collection to which you’re importing. When you start “from scratch”, all of the data will start going to a single node. As that node fills up, MongoDB will start “splitting” that node into chunks. Once it gets to around 8 chunks (that’s about 8x64MB of index space), it will start migrating chunks.

    So basically, you’re effectively writing to a single node and then that node is being slowed down because it has to read and write its data to the other nodes.

    This is why you’re not seeing any speedup with 3 mongoimport. All of the data is still going to a single node and you’re maxing out that node’s throughput.

    The trick here is to “pre-split” the data. In your case, you would probably set it up so that you get about 70 files worth of data on each machine. Then you can import those files on different threads and get better throughput.

    Jeremy Zawodny of Craigslist has a reasonable write-up on this here. The MongoDB site has some docs here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET application running on shared hosting and want to use Windows
I have a site running in a Windows shared hosting environment. In their control
If I have SSH access to a shared server (running centOS) and I want
This is a sharded setup of MongoDB (2.0.0) with multiple replica sets of 3
I'm running on a shared *NIX server (run by Site5). I have a php
we have a lot of users running in different shared and solo-owned repositories in
I've a site which is running in a shared host without memcached. So, how
I have an ASP.NET 2.0 web application running on a shared server of a
I am trying to upload an ASP.NET MVC application in a shared server running
I am running a website on shared hosting at GoDaddy (not my choice, because

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.