When you use Linux Elastic Compute Service (ECS) instances, the high disk I/O load issue may cause instance stuttering or slow file read/write operations. This topic describes the causes of and solutions to the issue.
Problem description
When you use a Linux ECS instance, the following issues may occur:
System stuttering, slow file read/write operations, application performance degradation, or slow internal service response occurs.
The disk I/O load statistics in the ECS console indicate that the disk I/O load is too high. For example, the I/O load is considered high if the current read/write rate is greater than or equal to 80% of the disk I/O performance metric.
You are alerted of the message that the disk I/O load exceeds the threshold.
Possible causes
High disk I/O load issue may occur due to the following reasons:
An abnormal process or service consumes many disk I/O resources.
Business programs and scenarios require high disk I/O that exceeds the disk I/O performance capacity of the Windows ECS instance.
Troubleshoot the issues
To identify and troubleshoot the issue, perform the following steps:
Use iostat to query the overall disk I/O load
The iostat command is used to monitor I/O performance in Linux. You can use iostat to query the overall disk I/O load.
Run the following command to view the disk I/O load in the operating system:
sudo iostat -d -m 3 5Note-d: displays only device statistics, not CPU usage.
-m: displays statistics in MB.
3: The data collection interval. Unit: seconds.
5: The number of times of data collection.
The following command output is returned:
Linux 5.10.134-18.al8.x86_64 (iZbpxxxxxxxxxxxxxxxaqhZ) 04/07/2025 _x86_64_ (4 CPU) Device tps MB_read/s MB_wrtn/s MB_read MB_wrtn vda 145.67 0.00 126.81 0 380 vdb 0.00 0.00 0.00 0 0 Device tps MB_read/s MB_wrtn/s MB_read MB_wrtn vda 161.33 0.00 127.24 0 381 vdb 0.00 0.00 0.00 0 0 ...Take note of the following parameters in the command output. For information about other parameters, run the
man iostatcommand.Device: The name of the disk.
tps: The number of I/O requests per second.
MB_read/s: The file read speed per second.
MB_wrtn/s: The file write speed per second.
MB_read: The size of files read.
MB_wrtn: The size of files written.
If the actual disk I/O performance is significantly lower than the performance metrics released by Alibaba Cloud for the disk category, we recommend that you check whether the disk partitions are 4K aligned. This helps you quickly identify performance overhead issues caused by improper alignment configuration.
For information about block storage performance, see Block storage performance.
Use iotop to check the disk I/O load of processes
The iotop tool is a Linux command and a top-like utility used to monitor disk I/O usage. You can use iotop to check the disk I/O load of individual processes.
Run a command to install iotop based on the Linux distribution.
Alibaba Cloud Linux, CentOS, or Fedora
sudo yum install -y iotopUbuntu or Debian
sudo apt install -y iotopopenSUSE
sudo zypper install -y iotopRun the following command to check the disk I/O load:
sudo iotop -P -k -d 3Note-P: displays the process ID (PID).
-k: displays in the unit of KB.
-d: specifies the data collection interval. Unit: seconds. Default value: 1.
The following command output is returned. To exit the program, press the
qkey.Total DISK READ : 0.00 K/s | Total DISK WRITE : 80373.45 K/s Actual DISK READ: 0.00 K/s | Actual DISK WRITE: 127781.85 K/s PID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND 17250 be/4 root 0.00 K/s 80354.87 K/s 0.00 % 95.99 % dd if=/dev/zero of=/mnt/dev_vdb/swap bs=1M count=10240 15192 be/3 root 0.00 K/s 6.64 K/s 0.00 % 60.56 % [jbd2/vdb1-8] 17152 be/4 root 0.00 K/s 0.00 K/s 0.00 % 59.55 % [kworker/u8:0 ...Take note of the following parameters. For information about other parameters, run the
iotop -hcommand.PID: the PID.
DISK READ: the read I/O speed of the process.
DISK WRITE: the write I/O speed of the process.
SWAPIN: the percentage of the CPU time that the process spends waiting for memory pages to be swapped in from the swap space.
IO>: the percentage of the CPU time that the process spends waiting for I/O, including swap-in and disk I/O waiting.
COMMAND: the command name of the process.
If the kjournald process consumes more disk I/O resources than other processes, we recommend that you change the journal size of the corresponding partition. For more information, see How do I handle the issue when the kjournald process consumes a large number of disk I/O resources?
Resolve the issues
The following table describes the common causes of and solutions to high disk I/O load issues.
Problem description | Cause | Solution |
An abnormal user program or process consumes a large number of disk I/O resources for a long time. | The program or process is abnormal and consumes excessive disk I/O resources during the runtime. | Use the iotop tool to locate the PID of the program or process that consumes a large number of disk I/O resources, and end the process by running the Warning Before you end a process, check the program or process information to prevent business interruptions due to accidental operations. Proceed with caution. |
A normal user program or process consumes a large number of disk I/O resources for a long time. | The program or process that consumes excessive disk I/O resources during the runtime is normal. | If the disk encounters an I/O performance bottleneck, perform one of the following operations based on your actual business scenario:
|
| The services on the instance require higher disk I/O performance than that the current disk provides. |