Skip to content

Commit 03164f8

Browse files
committed
DOCS-920 getShardDistribution method, including sample output
1 parent 207e6bb commit 03164f8

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

source/reference/method/db.collection.getShardDistribution.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,26 @@ db.collection.getShardDistribution()
9393
returns the average object size, including the unit of measure,
9494
for the shard.
9595

96+
For example, the following is a sample output for the distribution
97+
of a sharded collection:
98+
99+
.. code-block:: sh
100+
101+
Shard shard-a at shard-a/MyMachine.local:30000,MyMachine.local:30001,MyMachine.local:30002
102+
data : 38.14Mb docs : 1000003 chunks : 2
103+
estimated data per chunk : 19.07Mb
104+
estimated docs per chunk : 500001
105+
106+
Shard shard-b at shard-b/MyMachine.local:30100,MyMachine.local:30101,MyMachine.local:30102
107+
data : 38.14Mb docs : 999999 chunks : 3
108+
estimated data per chunk : 12.71Mb
109+
estimated docs per chunk : 333333
110+
111+
Totals
112+
data : 76.29Mb docs : 2000002 chunks : 5
113+
Shard shard-a contains 50% data, 50% docs in cluster, avg obj size on shard : 40b
114+
Shard shard-b contains 49.99% data, 49.99% docs in cluster, avg obj size on shard : 40b
115+
96116
.. seealso:: :doc:`/sharding`
97117

98118
.. COMMENT -- not sure if I should mention the source of the data:

0 commit comments

Comments
 (0)