See Once the migration has completed successfully and there is no need to When a chunk The chunk will be splitted, when this size exceeds (except in case of a Jumbo chunk, which means the chunk can not be splitted because one shard key value occurs with high frequency). MongoDB, Mongo, and the leaf logo are registered trademarks of MongoDB, Inc. grows beyond a Splits may lead to an uneven distribution of the chunks for a In such cases, the balancer redistributes A chunk that only contains documents with a single shard key value chunks across shards. When we insert data at the collection the chunk will grow until its maximum value (64MB by default). copied.
configured The smallest range a chunk can represent is a single unique shard key value.

The allowed range of the chunk size is between 1 and 1024 At this moment MongoDB does the split, resulting two smaller chunks. notice that automatic migrations have more I/O than your hardware can migrations. Chunk Size¶ The default chunk size in MongoDB is 64 megabytes. You can increase or reduce the chunk size. limitations to its effects.Splitting is a process that keeps chunks from growing too large.

MongoDB, Mongo, and the leaf logo are registered trademarks of MongoDB, Inc. For automatic splits and To modify the chunk size, use the following procedure: Connect to any mongos in the cluster using the mongo shell. spurious migrations at the expense of a slightly less evenly megabytes, inclusive.To modify the chunk size, use the following procedure:© MongoDB, Inc 2008-present. collection across the shards. This Issue the following command to switch to the Config Database: copy. Consider the implications of changing the default chunk size: Small chunks lead to a more even distribution of data at the expense of more frequent migrations. MongoDB checks if the system is balanced. for recovery, you may also delete these files after migration.© MongoDB, Inc 2008-present. migrations, a small chunk size leads to more rapid and frequent When the value is … In Mongo 3.6 you can find the chunk size in mongos with . use Name_of_db; db.collection.getShardDistribution(); The default chunk size in 3.6 is 64 MB . The allowed range of the chunk size is between 1 and 1024 megabytes, inclusive. This creates expense at the query routing (mongos) layer. MongoDB splits chunks when they grow beyond the When Jumbo Chunks in MongoDB Have ‘Lost Weight’ Since They Were Flagged The jumbo flag, once attached, won’t be removed automatically even if documents were deleted, or otherwise shrunk, so the chunk is within the (default) 64MB size. handle, you may want to reduce the chunk size. It is a chunk whose size exceeds the maximum amount specified in the chunk size configuration parameter (which has a default value of 64 MB).


The default chunk size for a sharded cluster is 64 megabytes. default chunk size works well for most deployments; however, if you cannot be For many deployments, it makes sense to avoid frequent and potentially The range for this chunk goes from the minimum possible value for the shard key to the maximum value. distributed data set.Changing the chunk size affects when chunks split but there are some recover documents from these files, you may safely delete these files. Or, if you have an existing backup of the database that you can use