Updated on 2024-09-06 GMT+08:00

Managing Disk Capacity

Storage occupied by data and logs and historical changes of storage usage are important for database performance. On the Storage Analysis page, you view the distribution and change trend of the storage space. Autoscaling, Tablespaces, Top 50 Databases, and Top 50 Tables are also available on this page.

Functions

Table 1 Functions

Function

Description

Related Operation

Overview

This function displays the storage usage, available storage, total storage, daily increase in the last week, and estimated available days of storage.

Viewing Storage Usage

Tablespaces

This function counts the tables with abnormal tablespace growth, tables without primary keys, and tables without indexes.

Tablespaces

Disk Space Distribution and Used Disk Space

You can view the distribution and change trend of the storage space.

Viewing Disk Space Distribution

Top Databases and Tables

You can view the top 50 databases and tables by physical file size and identify the databases and tables with high usage based on storage space distribution.

Top Databases and Tables

Viewing Storage Usage

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > GaussDB(for MySQL).
  4. On the Instances page, click the instance name.
  5. In the navigation pane, choose DBA Assistant > Real-Time Diagnosis.
  6. Click the Storage Analysis tab. In the Overview area, view the storage usage.

    Figure 1 Viewing the storage overview

    The following information is displayed:
    • Storage usage
    • Available and total storage
    • Average daily increase in the last week
    • Available days of storage

      If the average daily increase in last week is 0 GB, the estimated available days of storage are unlimited and are not displayed.

Tablespaces

This function counts the tables with abnormal tablespace growth, tables without primary keys, and tables without indexes.

  1. In the Abnormal Tables area, click Subscribe.

    Figure 2 Abnormal Tables

  2. In the Subscribe to Intelligent O&M dialog box, confirm the information, select the agreement, and click Subscribe.

    Figure 3 Subscribing to Intelligent O&M

  3. In the Tablespaces area, view table diagnosis results.

    Figure 4 Viewing table diagnosis results

    Both automated diagnosis and manual diagnosis are supported.

    • Automated diagnosis

      Tables in Top 50 Tables are automatically diagnosed at about 04:00 every day.

      In the left part of the Tablespaces area, you can view tables whose tablespace has grown abnormally in the past day. You can click the number to view the diagnosis details and handle the abnormal tables based on the suggestions provided.

      Figure 5 Viewing diagnosis details

      Any table whose tablespace has grown by more than 10,240 MB in the past day is counted. You can also click on the right of Auto Diagnosis to set the upper limit for daily tablespace increase.

      Figure 6 Setting the upper limit

    • Manual diagnosis

      Click Re-diagnose to manually trigger a diagnosis task. This operation can be performed every 10 minutes. The diagnosis scope is not limited.

      Once the diagnosis is complete, you can view the numbers of tables without primary keys and tables without indexes. You can click a number to view the diagnosis details and handle the abnormal tables based on the suggestions provided.

      Figure 7 Viewing diagnosis details

      • If the number of tables exceeds 5,000, manual diagnosis cannot be used.
      • If the CPU usage exceeds 90%, manual diagnosis cannot be used.

Viewing Disk Space Distribution

You can view the distribution and change trend of the storage space.

Figure 8 Viewing disk space distribution

  • Data space: Disk space occupied by user data
  • Binlog: Disk space occupied by binlogs
  • Temporary space: Disk space occupied by temporary files

Top Databases and Tables

  1. Click on the right of Collect Top Databases and Tables to enable the function.

    The system automatically collects data of top 50 databases and tables at about 04:00 every day.

    Figure 9 Enabling Collect Top Databases and Tables

  2. View the top 50 databases and tables by physical file size and identify the databases and tables with high usage based on storage space distribution.

    • Physical file sizes are precisely recorded, but other fields' values are estimated. If there is a large gap between a file size and another field, run ANALYZE TABLE on the table.
    • A database or table whose name contains special characters, including slashes (/) and #p#p, is not counted.
    • If there are more than 50,000 tables in your instance, to prevent data collection from affecting the instance performance, top databases and tables will not be counted.
    • Some statistics may be missing because data of databases or tables is fluctuating.
    Figure 10 Viewing top 50 databases and tables

    Click View Chart in the Operation column to view data volume changes in the last 7 days, last 30 days, or a custom time period (spanning no more than 30 days).