All Products
Search
Document Center

Database Autonomy Service:Storage analysis

Last Updated:Jan 24, 2024

Timely detection and resolution of storage-related issues is an important task for database O&M. Database Autonomy Service (DAS) provides the storage analysis feature. You can use this feature to view the storage usage of a database instance and the storage information about each table in a database. This helps you identify storage exceptions at the earliest opportunity. DAS also allows you to recycle tablespace fragments to prevent disk space waste and performance degradation.

Prerequisites

  • The database instance that you want to manage is of one of the following types:

    • Self-managed MongoDB database

    • ApsaraDB for MongoDB instance

      Note

      Only replica set or sharded cluster instances that run MongoDB V4.0 or later are supported.

  • The database instance is connected to DAS and is in the Normal Access state. For more information, see Database Instances.

View information on the Storage Analysis page

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Instance Monitoring.

  3. On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.

  4. In the left-side navigation pane, click Storage Analysis. On the page that appears, click the Storage Overview or Data Space tab. On the Storage Overview tab, you can view the storage statistics, Exceptions, and Storage Trend of the instance. On the Data Space tab, you can view the storage usage.

    Tab

    Section

    Description

    Storage Overview

    Storage

    You can view information such as exceptions, the average daily increase in space usage within the last seven days, the number of days for which the remaining storage space is available, and the total amount of used space.

    Note

    You can move your pointer over the image.png icon to view the details of each item.

    Exceptions

    You can view the exception information about tables or collections in the database instance.

    Storage Trend

    You can view the usage trend within a specific time range.

    Note

    The time range can be up to seven days.

    Tablespaces

    You can view the detailed information and storage usage of each table in the database instance. You can click the name of a table to view the Field and Index of the table.

    Data Space

    You can view the storage usage of each database in the database instance and the usage of tablespaces in the database.

    You can click the name of a table to view the Field and Index of the table.

Recycle tablespace fragments

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Instance Monitoring.

  3. On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.

  4. On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.

  5. In the left-side navigation pane, click Storage Analysis.

  6. In the Tablespaces section, find the table that you want to manage. Click Recycle in the Fragmentation Rate column.

  7. In the Recycle dialog box, create the tablespace fragment recycling plan.

    • Automatic tablespace fragment recycling

      If you configure a plan to automatically recycle tablespace fragments for the instance, DAS automatically detects the collections of hidden nodes during the specified maintenance window, and then runs the compact command on the collections with the sum of index storage and data space greater than 1 GB and the fragmentation percentage greater than 20%.

    • Manual tablespace fragment recycling

      In the Collection with High Fragmentation Rate section, find the collection that you want to manage, and click Recycle in the Actions column. You can recycle the tablespace fragments by selecting Execute Now or Run in the O & M window.

      Note

      If the Recyclable Space of the collection is small, the recycling may be less effective than expected.

View the recycling results

After the recycling task is complete, click Re-analyze to view the results.

References

The storage analysis feature is supported only for ApsaraDB for MongoDB replica set or sharded cluster instances whose database version is MongoDB 4.0 or later. For more information about how to recycle tablespace fragments of other ApsaraDB for MongoDB instances, see Defragment a disk to improve disk usage.