High Storage Usage
If the storage usage of a DDS instance is too high or fully used, the instance becomes unavailable.
This section describes how to analyze and fix high storage usage.
Checking the Storage Usage
DDS provides the following two methods to check the storage usage of an instance:
- Check the storage usage on the DDS console.
You can log in to the DDS console and click the instance. On the Basic Information page, you can view the storage space of the instance in the Storage Space area.
Figure 1 Checking the storage usage
- View the monitoring metrics (storage usage and used storage).
To view monitoring metrics, see Viewing Monitoring Metrics.
Figure 2 Checking the storage usage
Solution
- For cluster instances, data may be unevenly distributed because the database collection is not properly sharded. As a result, the storage usage is high.
- As service data increases, the original database storage is insufficient. You can expand the storage space to fix this problem.
- To scale up storage for cluster instances, see Scaling Up a Cluster Instance.
- To scale up storage for replica set instances, see Scaling Up a Replica Set Instance.
- To scale up storage for single node instances, see Scaling Up a Single Node Instance.
If the storage space has reached the upper limit of your instance class, change the instance class first.
- To change the cluster instance class, see Changing a Cluster Instance Class.
- To change the replica set instance class, see Changing a Replica Set Instance Class.
- To change the single node instance class, see Changing a Single Node Instance Class.
- If a large number of expired files occupy the storage space, delete the expired files in time. For example, if the entire database is no longer used, run dropDatabase to delete it.
- The background data processing mechanism is faulty.
In this case, operations such as write, update, and delete (including index insertion and deletion) are actually converted to write operations in the background. The underlying storage engines (WiredTiger and RocksDB) use appendOnly. Only when the internal data status of the storage engine meets certain conditions, the compaction operation is triggered to compress data and release storage space.
That is why sometimes the disk usage seems greater than the actual data volume, but your services are not affected. The internal data compression operations will not be executed immediately. As data continues to be written, compression is triggered in the background to clear the space.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.