Any way to see or increase mongodump's batch size?

mongodump seems to work much faster on the node it backs up vs. over a network link. Wondering if this is because it’s chatty and wondering if there’s a way to make it use larger batches when reading collections? Looks like the tool is written in go, and presumably if using the go driver it would use the default go driver’s options but not sure.

Hi Nuri,

You might want to play around with the --numParallelCollections parameter in mongodump. By default this is set to 4, so if your network bandwidth is sufficient, increasing this may show an increased dump speed.

Having said that, you might want to do a basic sanity check on your network bandwidth. If you’re dumping locally and it’s fast vs. over the network, typically this implies that the bottleneck is the network. You might want to check the size of your database e.g. by using dbStats command and calculate the time required to transfer the whole database using your network bandwidth.

Best regards,
Kevin