This topic describes how to view the storage usage of an ApsaraDB for MongoDB instance by using the storage analysis feature of CloudDBA. This feature provides an overview of the storage usage in the instance. This feature also provides details about the storage space that is occupied by each object in the instance. You can use the storage analysis results to identify and troubleshoot storage exceptions. This ensures the stable performance of the instance.

Prerequisites

The instance is a replica set instance that runs MongoDB 4.0 or later.

Procedure

  1. Log on to the ApsaraDB for MongoDB console.
  2. In the upper-left corner of the page, select the resource group and the region of the target instance.
  3. In the left-side navigation pane, click Replica Set Instances.
  4. Find the target instance and click its ID.
  5. In the left-side navigation pane, choose CloudDBA > Storage Analysis.
    Note If you have analyzed the storage usage of the instance, you can click Re-analyze in the upper-right corner of the page to update the storage analysis results that are displayed.
  6. On the Storage Overview or Data Space tab, view the storage analysis results.
    Storage Overview tab and Data Space tab
    • Storage Overview tab
      This tab contains four sections: Storage, Exceptions, Storage Trend, and Tablespaces.
      • Storage sectionStorage section
        Parameter Description
        Exception The number of storage exceptions that are identified in the instance. ApsaraDB for MongoDB can identify the following types of exceptions:
        • More than 90% of the storage capacity is used.
        • The available physical storage space will be exhausted within seven days.
        • A single collection contains more than 10 indexes.
        Avg Daily Increase in Last Week The average daily increase of storage usage in the instance over the last seven days.

        Formula: (Size of available storage space at the time of collection - Size of available storage space seven days ago)/7.

        Note
        • This increase indicates the average daily increase over the last seven days at the time of collection.
        • This parameter is suitable for scenarios in which the traffic volume remains stable. The value of this parameter is inaccurate in the event of abrupt storage changes that are caused by batch import, deletion of historical data, instance migration, or instance rebuilding.
        Available Days of Storage The number of days during which storage space is available in the instance.

        Formula: Size of available storage space/Average daily increase over the last seven days.

        Note
        • A value of 90+ indicates that the available storage space in the instance is sufficient for a long period of time.
        • This parameter is suitable for scenarios in which the traffic volume remains stable. The value of this parameter is inaccurate in the event of abrupt storage changes that are caused by batch import, deletion of historical data, instance migration, or instance rebuilding.
        Used Storage The amount of storage space that is used in the instance in contrast to the storage capacity of the instance.
      • Exceptions section

        This section displays information about the storage exceptions that are identified. You can troubleshoot the exceptions based on the information.

        Exceptions section
      • Storage Trend section

        This section displays the trends of Data Space, Used Storage, and Log Space over the last seven days.

        Storage Trend section
      • Tablespaces section
        This section displays information of all tables. The information includes Collection Name, Database Name, Storage Engine, and Collection Storage.
        Note You can click the name of a collection to view details about the indexes in the collection.
        Tablespaces section
    • Data Space tab
      This tab displays information of tablespaces. The information includes Data Space and Tablespaces.
      Note
      • You can click the name of a data space to view details about the associated tablespace.
      • You can click the name of a collection to view details about the indexes in the collection.
      Data Space tab

Related tasks

The storage analysis feature of CloudDBA can analyze up to 20,000 tables. If no storage analysis results are displayed, you can check whether the number of tables exceeds 20,000 or whether the account that is used does not have the permissions on the specified tables or databases. If the account does not have the required permissions, you can use one of the following methods to re-authorize storage analysis on the specified tables or databases:
  • Re-authorize an existing account to perform storage analysis on the specified tables or databases.
    1. In the upper section of the page, click Re-authorize.
    2. Enter the username and password of the account in the Database Account and Password fields.
    3. Click OK.
  • Re-authorize the current account to perform storage analysis on the specified tables or databases by using a command.
    1. In the upper section of the page, click Re-authorize.
    2. Enter the username and password of the account in the Database Account and Password fields.
    3. Click Generate Authorization Command.
    4. Click OK.