By Decai Xu
Replica set instance that runs MongoDB 7.0.
The instance contains 10 collections that each has about 71 GB of data.
db.collection_0.deleteMany({ time: { $lt: "2024-11-07 00:00:00" } });
In collection_0, the data volume is 35.97 GB, the fragmentation rate is 21.56%, and the recyclable space is 3.91GB.
In collection_0, the data volume is 36.07 GB, the fragmentation rate is 60.57%, and the recyclable space is 10.69 GB.
In collection_0, the data volume is 43.52 GB, the fragmentation rate is 52.40%, and the recyclable space is 9.48 GB.
In collection_0, the data volume is 46.05 GB, the fragmentation rate is 49.61%, and the recyclable space is 8.98 GB.
In collection_0, the data volume is 48.10 GB, the fragmentation rate is 47.35%, and the recyclable space is 8.57 GB.
In collection_0, the data volume is 55.45 GB, the fragmentation rate is 39.24%, and the recyclable space is 7.10 GB.
In collection_0, the data volume is 59.70 GB, the fragmentation rate is 34.56%, and the recyclable space is 6.26 GB.
In collection_0, the data volume is 114.57 GB, the fragmentation rate is 0.04%, and the recyclable space is 9.44 GB. Inserted data reuses the existing storage space, which reduces the fragmentation rate and the recyclable space.
The total disk space is 1,000 GB, among which 797.67GB has been used. The disk utilization is 79.77%. No disk fragments can be recycled.
db.collection_0.deleteMany({ time: { $lt: "2024-11-11 00:00:00" } });
db.collection_1.deleteMany({ time: { $lt: "2024-11-11 00:00:00" } });
db.collection_2.deleteMany({ time: { $lt: "2024-11-11 00:00:00" } });
db.collection_3.deleteMany({ time: { $lt: "2024-11-11 00:00:00" } });
db.collection_4.deleteMany({ time: { $lt: "2024-11-11 00:00:00" } });
db.collection_5.deleteMany({ time: { $lt: "2024-11-11 00:00:00" } });
db.collection_6.deleteMany({ time: { $lt: "2024-11-11 00:00:00" } });
db.collection_7.deleteMany({ time: { $lt: "2024-11-11 00:00:00" } });
db.collection_8.deleteMany({ time: { $lt: "2024-11-11 00:00:00" } });
db.collection_9.deleteMany({ time: { $lt: "2024-11-11 00:00:00" } });
The data volume is 320 GB and used storage space is 790 GB with a high fragmentation rate. In addition, a large amount of space can be recycled.
Disk space is scaled down from 1,000 GB to 500 GB.
The data volume is 320 GB, which occupies only 62 GB of storage space. The fragmentation rate is very low, and the disk fragments are recycled. The scale-down time takes about 35 minutes and the scale-down rate is about 9 GB/min.
MongoDB 8.0 Debuts on Alibaba Cloud Discover Enhanced Performance and Security!
ApsaraDB - April 17, 2019
ApsaraDB - December 22, 2022
Alibaba Clouder - October 1, 2019
Alibaba Cloud Community - April 1, 2022
Alibaba Cloud Community - March 22, 2022
Alibaba Clouder - August 12, 2019
A secure, reliable, and elastically scalable cloud database service for automatic monitoring, backup, and recovery by time point
Learn MoreApsaraDB for HBase is a NoSQL database engine that is highly optimized and 100% compatible with the community edition of HBase.
Learn MoreBuild a Data Lake with Alibaba Cloud Object Storage Service (OSS) with 99.9999999999% (12 9s) availability, 99.995% SLA, and high scalability
Learn MoreA financial-grade distributed relational database that features high stability, high scalability, and high performance.
Learn MoreMore Posts by ApsaraDB