Document Database Service

Troubleshooting of High Disk Usage

2025-07-16 06:34:37

Troubleshooting of high disk usage and solutions:

  1. Check the disk usage in the Disk label on the Dashboard.

  2. Solution:

    1. For cluster instances, the data may not be evenly distributed due to improper sharding, resulting in high disk usage. In this case, you can choose to properly shard the collection of databases. For more information, refer to the respective section to set sharding to make full use of the sharding performance.

    2. As the amount of service data increases, the requested database disk capacity becomes insufficient. In this case, we recommend that you expand the disk space to guarantee sufficient disk space.

    3. If the maximum disk space is reached for the current instance type, please change the instance type to a higher specification.

    4. A large amount of expired data files consume the disk space. In this case, clean up the expired data files. For example, if the entire database is no longer needed, you can run the dropDatabase command to delete the database to quickly release the disk space.

    5. Background data processing mechanism: Operations such as write, update, and delete operations (including index insertion and deletion operations) are always converted into write operations in the background. The underlying storage engine WiredTiger uses the appendOnly mechanism. The internal compaction operation is triggered for data compression to release the disk space when the internal data status of the storage engine meets certain conditions. As a result, it is sometimes found that the disk usage is larger than the actual data size. In fact, this only "seems large" and will not affect the use. This is because some internal data compression, is a delayed operation, not executed in real time. As data continues to be written, background data compression is triggered to clean up the disk space.


pPlWRCHyiLX6