The default is 64MB, and the value range is 1 MB to 1024x768.
What does that change cause? The following table summarizes briefly:
Chunk Size Adjustment |
splitting times (number of fragments) |
number of data across Shard |
Data Uniformity |
Network transfer times |
Migration Times |
single-pass migration transmission volume |
Query Speed |
|
decrease |
|
less evenly |
less |
less |
big |
faster |
Become smaller |
Increase |
Become more |
More uniform |
Become more |
Become more |
Become smaller |
Slowing down |
In the case of large amounts of data, consider the network bandwidth, if you find that the bandwidth is full, you can consider small chunk size, so that the migration caused by the traffic will be reduced
In the case of good server hardware, such as my server CPU core, memory of up to GB, disk TB. Consider adjusting the size of the chunk to reduce unnecessary shards.
The specific setting is to use the command, do not use the configuration file, refer to the Official document:
http://docs.mongodb.org/manual/tutorial/modify-chunk-size-in-sharded-cluster/
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
MongoDB Chunk Size setting