All Products
Search
Document Center

Database Autonomy Service:Inspection and scoring

Last Updated:Nov 03, 2023

Database Autonomy Service (DAS) provides the inspection and scoring feature. This feature inspects and scores all database instances on a daily basis. DAS also allows you to specify database instances and inspection periods and manually initiate inspection and scoring. This helps you understand the status of database instances.

Prerequisites

  • One of the following database instances is available for inspection and scoring:

    • ApsaraDB RDS for MySQL

    • Self-managed MySQL database

    • PolarDB for MySQL

    • ApsaraDB MyBase for MySQL

    • ApsaraDB for Redis

  • The database instance is connected to DAS and is in the Accessed state. For more information, see Connect an Alibaba Cloud database instance to DAS.

Configure inspection and scoring

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Inspection and Scoring.

  3. On the Instance Inspection and Scoring page, configure inspection and scoring for your database instance.

    • Enable automatic inspection and scoring

      1. In the upper-right corner of the page, click Settings.

      2. In the Configure Inspection and Scoring dialog box, select the engine that the database instance runs and click OK.ss

        Note

        After you enable this feature, the system scores each connected database instance once a day.

    • Manually initiate inspection and scoring

      1. Click Start Inspection.

      2. In the Select Instances section of the Instance Inspection dialog box, select one or more database instances and click the 选择 icon to add the database instances to the Selected Instances section.

      3. In the Inspection Time section, specify a time range.

        Note

        The start time of an inspection cannot be later than the current time. The minimum interval between the start time and the end time is 1 hour, and the maximum interval is 24 hours.

      4. Click Confirm.手动巡检

View the results of inspection and scoring

After you enable the inspection and scoring feature, you can search for a database instance by name or alias to view the inspection and scoring results within a specific period of time.

Note

The inspection and scoring feature scores the health status of your database instances based on an initial instance health score of 100. Points are deducted from the instance health score if specific conditions are met. For more information, see the Scoring rules section of this topic.

  • Click Delete in the Actions column of a database instance to delete the results.

  • Click Deduction Details in the Actions column of a database instance to view the deduction details in the Deduction Details dialog box.

  • Click Report in the Actions column of a database instance to view the scoring report details in the Scoring Report panel.

  • Click the ID of a database instance to view the performance trend of the database instance on the Performance Trends tab. For more information, see Performance trends.

  • Click the 下载 icon to download the inspection and scoring results to your computer.

Scoring rules

  • ApsaraDB RDS for MySQL, self-managed MySQL, and PolarDB for MySQL

    Item

    Description

    Sub-item

    Condition

    Deducted points

    CPU Utilization (cpuUsage)

    The average CPU utilization during a day. If an instance has multiple CPU cores, the system calculates the CPU utilization of each core and then calculates the average CPU utilization of all cores.

    Major

    70%<=cpuUsage<=80%

    1 + (cpuUsage - 0.7) × 20

    Critical

    cpuUsage>=80%

    min[3 + (cpuUsage - 0.8) × 30,10]

    Memory Usage (memUsage)

    The average memory usage during a day.

    Major

    80%<=memUsage<=90%

    1 + (memUsage - 0.8) × 20

    Critical

    memUsage>90%

    min[(memUsage - 0.9) × 50, 10]

    Space Usage (Space Usage)

    Important

    This item is not applicable to self-managed MySQL.

    The storage usage is calculated based on the following formula: Storage usage = Average used storage during a day/Total storage × 100%

    Available days

    availableDays<=30

    15 - availableDays/3

    Number of large tables

    Important

    This item is not applicable to PolarDB for MySQL because PolarDB for MySQL does not perform analysis on large tables.

    bigTableCount>0

    min(bigTableCount,15)

    Connection Usage (connectionRate)

    The connection usage is calculated based on the following formula: Connection usage = Average number of connections during a day/Maximum number of connections allowed at a point in time × 100%

    Major

    70%<=connectionRate<=80%

    1

    Critical

    connectionRate>80%

    3

    IOPS Usage (iopsUsage)

    The IOPS usage is calculated based on the following formula: IOPS usage = Average IOPS during a day/Maximum IOPS allowed × 100%

    Major

    70%<iopsUsage<90%

    3

    Critical

    iopsUsage>90%

    5

    Active Sessions (threadRunning)

    The number of active sessions generated in one day.

    Major

    threadRunning>min(2 × cpuCores + 8,64)

    3

    Critical

    threadRunning>min(4 × cpuCores + 8,96)

    9

    Slow SQL Statements (slowSqlCount)

    The number of slow SQL statements generated in one day.

    Note

    You can click the number to view the five slow SQL statements that are most frequently executed.

    Minor

    0<slowSqlCount<100

    1 + (slowSqlCount - 10)/30

    Major

    100<=slowSqlCount<500

    4 + (slowSqlCount - 100)/30

    Critical

    slowSqlCount>=500

    min[18 + (slowSqlCount - 50)/30, 30)]

    SQL Security Audit (sqlInjectionCount)

    The number of high-risk SQL statements and the number of SQL injection attacks.

    High-risk SQL statements

    riskSqlCount>0

    min(riskSqlCount,5)

    SQL injection

    sqlInjectionCount>0

    min(sqlInjectionCount,5)

    Deadlock

    Indicates whether a deadlock occurs during a day.

    Minor

    Minor

    3

  • ApsaraDB for Redis

    Item

    Description

    Sub-item

    Condition

    Deducted points

    CPU Utilization (cpuUsage)

    The average CPU utilization during a day. If an instance has multiple CPU cores, the system calculates the CPU utilization of each core and then calculates the average CPU utilization of all cores.

    Major

    70%<=cpuUsage<=80%

    1 + (cpuUsage - 0.7) × 20

    Critical

    cpuUsage>=80%

    min[3 + (cpuUsage - 0.8) × 30,10]

    Memory Usage (memUsage)

    The average memory usage during a day.

    Major

    80%<=memUsage<=90%

    1 + (memUsage - 0.8) × 20

    Critical

    memUsage>90%

    min[(memUsage - 0.9) × 50, 10]

    Connection Usage (connectionRate)

    The connection usage is calculated based on the following formula: Connection usage = Average number of connections during a day/Maximum number of connections allowed at a point in time × 100%

    Major

    70%<=connectionRate<=80%

    1

    Critical

    connectionRate>80%

    3

    Traffic Usage (FlowRate)

    The traffic usage is calculated based on the following formula: Traffic usage = Average traffic during a day/Maximum traffic allowed at a point in time × 100%

    Major

    80% <= FlowRate <= 85% (Both inbound traffic and outbound traffic count.)

    1

    Critical

    flowRate>85%

    3

    Critical

    iopsUsage>90%

    5

    Hot Keys (HotKey)

    The information about hot keys appears.

    Minor

    Minor

    3

    Slow SQL Statements (slowSqlCount)

    The total number of slow SQL statements generated in one day. You can click the number to view the five slow SQL statements that are most frequently executed.

    Minor

    0<slowSqlCount<100

    1 + (slowSqlCount - 10)/30

    Major

    100<=slowSqlCount<500

    4 + (slowSqlCount - 100)/30

    Critical

    slowSqlCount>=500

    min[18 + (slowSqlCount - 50)/30, 30)]

    Memory Fragmentation Ratio (HighMemoryFragment)

    The memory fragmentation ratio is calculated based on the following formula: mem_fragmentation_ratio = used_memory_rss/used_memory

    • used_memory_rss: the amount of physical memory that the operating system allocates to Redis. The sizes of memory fragments are counted in this value.

    • used_memory: the amount of memory that Redis requests to store data.

    For more information about memory fragments and the memory fragmentation ratio, see Memory Fragmentation.

    Minor

    HighMemoryFragment>1.5

    min(HighMemoryFragment × 2, 5)

Related API operations

Operation

Description

GetInstanceInspections

Queries the results of inspections that are performed on database instances by using the inspection and scoring feature.