Since V4.0.0, obdiag supports detecting disk IO performance through the obdiag tool io_performance command. This article will introduce the specific use.
Function introduction
This command is used to detect the disk IO performance of each node in the OceanBase cluster. It supports detecting the IO performance indicators of the clog disk and data disk to help users understand the disk performance status.
Notes
- This command requires SSH access to each OBServer node.
- It is recommended to perform testing during low business peak periods to obtain more accurate baseline data.
- If the await value continues to be high or util% is close to 100%, it is recommended to check the disk performance or consider expanding the capacity.
Command introduction
You can configure the -h option after the command to view command help:
obdiag tool io_performance -h
The output is as follows:
Usage: obdiag tool io_performance [options]
Options:
--disk=DISK disk type: clog or data
-c CONFIG config file path
--config_password=CONFIG_PASSWORD
config password
--inner_config=INNER_CONFIG
change inner config.
--config=CONFIG config options
-h, --help Show help and exit.
-v, --verbose Activate verbose output.
The options are explained below:
Option name |
Is it required |
Data type |
Default value |
Description |
|---|---|---|---|---|
| --disk | No | string | Default is empty | Disk type, configurable value is clog or data. |
| -c | No | string | ~/.obdiag/config.yml |
Configuration file path. |
| --config_password | No | string | Default is empty | obdiag When using an encrypted configuration file, you need to pass in the corresponding password through this option. |
| --inner_config | No | string | Default is empty | obdiag's own configuration. |
| --config | No | string | Default is empty | Configuration of the cluster to be diagnosed by obdiag, fixed style: --config key1=value1 --config key2=value2.
ExplanationParameters that support configuration through this option can be found in obdiag configuration. |
Usage example
Detect clog disk IO performance
obdiag tool io_performance --disk=clog
Output example:
IO Performance Check for clog disk:
+-------------------+--------+--------+--------+--------+
| Node | await | r/s | w/s | util% |
+===================+========+========+========+========+
| xxx.xxx.xxx.xxx | 0.5ms | 100 | 500 | 15% |
+-------------------+--------+--------+--------+--------+
| xxx.xxx.xxx.xxx | 0.8ms | 120 | 480 | 18% |
+-------------------+--------+--------+--------+--------+
Detect data disk IO performance
obdiag tool io_performance --disk=data
Output example:
IO Performance Check for data disk:
+-------------------+--------+--------+--------+--------+
| Node | await | r/s | w/s | util% |
+===================+========+========+========+========+
| xxx.xxx.xxx.xxx | 1.2ms | 200 | 300 | 25% |
+-------------------+--------+--------+--------+--------+
| xxx.xxx.xxx.xxx | 1.5ms | 180 | 320 | 28% |
+-------------------+--------+--------+--------+--------+
Use without configuration file
obdiag tool io_performance --disk=clog \
--config obcluster.servers.nodes[0].ip=xx.xx.xx.1 \
--config obcluster.servers.nodes[1].ip=xx.xx.xx.2 \
--config obcluster.servers.global.ssh_username=test \
--config obcluster.servers.global.ssh_password=****** \
--config obcluster.servers.global.home_path=/home/admin/oceanbase
Interpretation of results
Indicator |
Description |
|---|---|
| await | Average disk IO waiting time, in milliseconds (ms). The smaller the value, the faster the disk responds. |
| r/s | Number of read operations per second. |
| w/s | Number of write operations per second. |
| util% | Disk utilization percentage. A value that is too high (such as over 80%) may indicate a performance bottleneck on the disk. |
