I have a collection which have size : 60 GB
I want to shard this collection. Shard key is hash index and unique.
I followed this document https://docs.mongodb.com/manual/reference/limits/#Sharding-Existing-Collection-Data-Size
Avg byte size of shard key values 56287232
maxCollectionSize is coming 9.28 GB
As maxCollectionSize and Actual collection size different is huge i am unable to get what chunk size should i use
Thanks for help
As per MongoDB documentation Modify Chunk Size in a Sharded Cluster The default chunk size for a sharded cluster is
As MongoDB documentation here
New in version 2.6: MongoDB provides the
mergeChunks command to combine contiguous chunk ranges into a single chunk. See Merge Chunks in a Sharded Cluster for more information.
Note: Be careful when splitting data in a sharded collection to create new chunks. When you shard a collection that has existing data, MongoDB automatically creates chunks to evenly distribute the collection. To split data effectively in a sharded cluster you must consider the number of documents in a chunk and the average document size to create a uniform chunk size. When chunks have irregular sizes, shards may have an equal number of chunks but have very different data sizes. Avoid creating splits that lead to a collection with differently sized chunks.
For further your ref here