https://help.aliyun.com/knowledge_detail/41224.html?spm=5176.7841174.2.19.uqC1as# using Iostat to view disk IO load from system latitude IO Load Viewing method
View disk IO load from system latitude using Iostat
The IO load can be viewed from the system dimension through Iostat.
Iostat is not a common Linux distribution with its own tools, which are included in the Sysstat package and need to be installed by Yum or Apt-get before it can be used. Specific installation Methods This article is no longer detailed.
Usage notes:
示例用法:iostat -d -k 2# -d 表示,显示设备(磁盘)使用状态。# -k 表示让某些使用 block 为单位的列强制使用 kB 为单位。# 2表示,数据显示每隔2秒刷新一次。示例输出:Linux 3.10.0-123.9.3.el7.x8664 (centos) 06/27/2016 _x86_64 (1 CPU)Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtnxvda 0.58 0.12 3.75 278001 8820028xvdb 0.00 0.00 0.00 740 0xvdc 0.00 0.00 0.00 1388 0xvde 0.00 0.00 0.00 2035 0xvdf 0.00 0.00 0.00 740 0
For more parameters and a description of the returned results, you can refer to Iostat's man help.
View disk IO load from process latitude using iotop
The IO usage of processes within the system can also be sorted by iotop from the process dimension.
Iotop is also not a common Linux distribution with its own tools and needs to be installed before it can be used, such as Yum or Apt-get. Specific installation Methods This article is no longer detailed.
Usage notes:
After running directly with the instruction iotop , you can see a screen similar to the following:
Echo Description:
- By default, the order is sorted in reverse order of IO usage, and you can use the left and right arrows to manipulate the sorted fields.
- Press R to toggle the sorting method.
- Press O to display only the processes that have Disk IO activity.
- For more parameters and a description of the returned results, you can refer to Iotop's man help.
Operation Case Kjournald process consumes high IO resource issues
Improve IO performance with 4K alignment
You can format the disk and automatically configure 4K alignment with the following script.
Note: Running this script will automatically format all data disk disks. If you are not purchasing a new disk, be sure to confirm that you have completed the data backup on the relevant disk before you proceed. You can make a backup of the disk through a snapshot, and you can see how to Create a snapshot .
- Download Script Auto_fdisk.zip.
- After extracting the auto_fdisk.zip, upload the corresponding script to the target server.
- Add execute permissions for the script by chmod +x , and so on.
- As root, add execute permissions to the script as follows, and then run:
chmod +x ./auto_fdisk.sh./auto_fdisk.sh
Cloud server ECS Linux IO High-footprint troubleshooting method