> Is it a good practice to turn on balancer after large data import and turn
> it off before another import?
That depends - if your cluster has the capacity to both balance and do the
import then that is preferred, since the writes are more likely to be more
evenly distributed and the data is balanced in increments rather than a
large batch (which can take a long time - each shard can take part in only
a single migration at a time). If the import is causing extremely heavy
load, then turning off the balancer can help by freeing up the resources
used to balance. It's a judgement call based on your cluster, your needs
Documentation says that balancer window must be sufficient to complete the
> migration. What happens when balancer will not migrate all data?
The balancer will run until all in-flight migrations are complete, then
stop - your data will remain in that state until you turn the balancer on
again. If you do another import in the meantime, then the data will become
more unbalanced and you will essentially repeat this pattern forever (i.e.
your data will never be balanced). Hence the note in the docs - it won't
break anything per se, but your data will remain unbalanced from a shard
perspective. You can see the chunk distribution with sh.status() from the