Updated on 2023-03-15 GMT+08:00

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:

  1. 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
  2. View the monitoring metrics (storage usage and used storage).

    To view monitoring metrics, see Viewing Monitoring Metrics.

    Figure 2 Checking the storage usage

Solution

  1. For cluster instances, data may be unevenly distributed because the database collection is not properly sharded. As a result, the storage usage is high.

    Shard the database collection properly.

  2. As service data increases, the original database storage is insufficient. You can expand the storage space to fix this problem.

    If the storage space has reached the upper limit of your instance class, change the instance class first.

  3. 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.
  4. 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.

Database Performance FAQs

more