Skip to content

Latest commit

 

History

History
76 lines (46 loc) · 5.45 KB

dashboard-resource-manager.md

File metadata and controls

76 lines (46 loc) · 5.45 KB
title summary
TiDB Dashboard Resource Manager Page
Introduce how to use the Resource Manager page in TiDB Dashboard to view the information about resource control, so you can estimate cluster capacity before resource planning and allocate resources more effectively.

TiDB Dashboard Resource Manager Page

To implement resource isolation using the Resource Control feature, cluster administrators can create resource groups and set quotas for each group. Before resource planning, you need to know the overall capacity of the cluster. This document helps you view the information about resource control, so you can estimate the cluster capacity before resource planning and allocate resources more effectively.

Access the page

You can use one of the following two methods to access the Resource Manager page:

Resource Manager page

The following figure shows the Resource Manager details page:

TiDB Dashboard: Resource Manager

The Resource Manager page contains the following three sections:

  • Configuration: This section displays the data obtained from the RESOURCE_GROUPS table of TiDB. It contains the information about all resource groups. For more information, see RESOURCE_GROUPS.

  • Estimate Capacity: Before resource planning, you need to know the overall capacity of the cluster. You can use one of the following methods:

  • Metrics: By observing the metrics on the panels, you can understand the current overall resource consumption status of the cluster.

Estimate Capacity

Before resource planning, you need to know the overall capacity of the cluster. TiDB provides two methods to estimate the capacity of Request Unit (RU) in the current cluster:

  • Estimate capacity based on hardware deployment

    TiDB accepts the following workload types:

    • tpcc: applies to workloads with heavy data write. It is estimated based on a workload model similar to TPC-C.
    • oltp_write_only: applies to workloads with heavy data write. It is estimated based on a workload model similar to sysbench oltp_write_only.
    • oltp_read_write: applies to workloads with even data read and write. It is estimated based on a workload model similar to sysbench oltp_read_write.
    • oltp_read_only: applies to workloads with heavy data read. It is estimated based on a workload model similar to sysbench oltp_read_only.

    Calibrate by Hardware

    The Total RU of user resource groups represents the total amount of RU for all user resource groups, excluding the default resource group. If this value is less than the estimated capacity, the system triggers an alert. By default, the system allocates unlimited usage to the predefined default resource group. When all users belong to the default resource group, resources are allocated in the same way as when resource control is disabled.

  • Estimate capacity based on actual workload

    Calibrate by Workload

    You can select a time range for estimation within the range of 10 minutes to 24 hours. The time zone used is the same as that of the front-end user.

    • When the time window range does not fall between 10 minutes and 24 hours, the following error is displayed ERROR 1105 (HY000): the duration of calibration is too short, which could lead to inaccurate output. Please make the duration between 10m0s and 24h0m0s.

    • When the workload within the time window is too low, the following error is displayed ERROR 1105 (HY000): The workload in selected time window is too low, with which TiDB is unable to reach a capacity estimation; please select another time window with higher workload, or calibrate resource by hardware instead is displayed.

    You can select an appropriate time range using CPU Usage in the Metrics section.

Metrics

By observing the metrics on the panels, you can understand the current overall resource consumption status of the cluster. The monitoring metrics and their meanings are as follows:

  • Total RU Consumed: The total consumption of Request Units counted in real time.
  • RU Consumed by Resource Groups: The number of Request Units consumed by resource groups in real time.
  • TiDB
    • CPU Quota: The maximum CPU usage of TiDB.
    • CPU Usage: The total CPU usage of all TiDB instances.
  • TiKV
    • CPU Quota: The maximum CPU usage of TiKV.
    • CPU Usage: The total CPU usage of all TiKV instances.
    • IO MBps: The total I/O throughput of all TiKV instances.