Analyze the container cluster , The problem is that the storage space is too large ( And stand alone Mongo contrast ). The content involves a lot , So I wrote it step by step according to the idea of dealing with problems .
For the same dataset
Status quo of cluster space :
Status of stand-alone version :
Configure the server , Neither copy nor arbitration counts , Just two pieces add up , The amount of data is 2.3G, Almost stand-alone 2.4 times .
About Compact You can refer to This article , Because it has happened before , So I wonder if it's because Balance The physical space caused by post opening is not released .
Mongos Can't execute Compact operation , To go to the master node of the corresponding partition
docker exec -it shardsvr10 bash