> ## Documentation Index
> Fetch the complete documentation index at: https://help.freakhosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Check Disk I/O on Linux with iostat and iotop

> Check disk I/O on Linux: run iostat -xyz 5 to see each disk's await and %util, then sudo iotop-c -o or pidstat -d 5 to find which process is reading or writing.

To check disk I/O on Linux, install `sysstat` and run `iostat -xyz 5` to see each disk's reads and writes per second, wait time (`r_await`, `w_await`) and busy time (`%util`). Then find the process doing the I/O with `sudo iotop-c -o` (Ubuntu/Debian) or `pidstat -d 5`, which works on every distribution. High `%iowait` in `top` is the usual first sign of a disk bottleneck.

| Difficulty | Time | Works on | Needs |
| - | - | - | - |
| Intermediate | 10 minutes | Ubuntu, Debian, AlmaLinux, Rocky Linux | sudo to install packages and run iotop |

## Before you start

* [Connect with SSH](https://help.freakhosting.com/portals/other/how-to-connect-to-a-linux-server-with-ssh.md). Root users can leave out `sudo`.
* These tools only read statistics. They don't add load or change data.
* Know your disk name: run `lsblk -d`. VPS disks are usually `vda` or `sda`; NVMe disks on dedicated servers are `nvme0n1`.

## How to install iostat and iotop

> [tab] Ubuntu / Debian
>
> ```bash theme={null}
> sudo apt update
> sudo apt install sysstat iotop-c
> ```
>
> `sysstat` provides `iostat` and `pidstat`. `iotop-c` is the maintained C version of iotop.

> [tab] AlmaLinux / Rocky
>
> ```bash theme={null}
> sudo dnf install sysstat
> ```
>
> On release 9 you can also add `iotop` with `sudo dnf install iotop`. `pidstat -d` (below) gives the same per-process view on every release.

## How to check disk I/O with iostat

```bash theme={null}
iostat -xyz 5
```

`-x` shows extended statistics, `-y` skips the first report (an average since boot), `-z` hides idle disks, and `5` prints a new report every 5 seconds. Press `Ctrl+C` to stop.

```text theme={null}
avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2.97    0.00    1.24   38.40    0.74   56.65

Device   r/s    rkB/s   r_await   w/s    wkB/s   w_await  aqu-sz  %util
vda     4.20    68.00     1.10  412.50  52800.00   24.60   10.20   99.20
```

The real output has more columns; these are the ones that matter most.

| Column | Meaning | Look for |
| - | - | - |
| `%iowait` | CPU idle while waiting for disk | Sustained high values point to the disk |
| `r/s`, `w/s` | Read and write requests per second (IOPS) | Compare with what your workload normally does |
| `rkB/s`, `wkB/s` | Data read and written per second | Large backups or copies show here |
| `r_await`, `w_await` | Average time per request in ms, including queueing | Rising values mean requests are waiting |
| `aqu-sz` | Average number of requests in the queue | A value that keeps growing means a queue is building |
| `%util` | Time the disk had requests in flight | Near 100% on one disk means it is busy |

> [!NOTE]
>
> The `iostat` manual warns that `%util` near 100% means saturation only for devices that handle one request at a time. SSDs, NVMe drives, RAID arrays and virtual disks handle many requests in parallel, so for them look at `await` and `aqu-sz` too.

## How to find which process is using the disk

> [tab] iotop (Ubuntu / Debian)
>
> ```bash theme={null}
> sudo iotop-c -o -P
> ```
>
> `-o` shows only processes doing I/O and `-P` shows processes instead of threads. Press `q` to quit. For a log-friendly snapshot:
>
> ```bash theme={null}
> sudo iotop-c -o -P -b -n 3
> ```

> [tab] pidstat (any distribution)
>
> ```bash theme={null}
> pidstat -d 5 1
> ```
>
> ```text theme={null}
> Average:      UID       PID   kB_rd/s   kB_wr/s kB_ccwr/s iodelay  Command
> Average:      999      2038     12.00  48210.00      0.00     310  mariadbd
> Average:        0      7312      0.00   4100.00      0.00      12  rsync
> ```
>
> `kB_rd/s` and `kB_wr/s` are data read and written per second. `iodelay` is how long the process waited for I/O. Run it with `sudo` to see other users' processes.

### Why iotop shows "unavailable" in the SWAPIN and IO columns

Since Linux 5.14 the kernel's task delay accounting is off by default, and iotop needs it for those two columns. Turn it on while you investigate:

```bash theme={null}
sudo sysctl kernel.task_delayacct=1
```

Turn it off again afterwards with `sudo sysctl kernel.task_delayacct=0`. The iotop manual advises keeping it off when not in use because it costs some performance. In interactive iotop, `Ctrl+T` toggles it.

## What causes high disk I/O and how to fix it

| Cause | Typical process | Fix |
| - | - | - |
| Backups or file sync | `tar`, `rsync`, `restic`, `rclone` | Schedule at quiet times; run with `ionice -c3` |
| Database writes or missing indexes | `mysqld`, `mariadbd`, `postgres` | Check slow queries; tune buffer sizes |
| Swapping | `kswapd0` and high `si`/`so` in `vmstat` | Free or add RAM. See [check memory usage](https://help.freakhosting.com/portals/other/how-to-check-memory-usage-on-linux.md) |
| Log flood | `journald`, `rsyslogd`, an app | Find the noisy log with [journalctl](https://help.freakhosting.com/portals/other/how-to-read-logs-with-journalctl.md) |
| Game world saves | `java`, game server binary | Increase the autosave interval |
| Disk nearly full | Any | See [find what is using disk space](https://help.freakhosting.com/portals/other/how-to-find-what-is-using-disk-space-on-linux.md) |

To make a job yield to everything else, run it in the idle I/O class:

```bash theme={null}
sudo ionice -c3 rsync -a /var/www/ /backup/www/
```

`-c3` (idle) only gets disk time when no other program has asked for disk I/O for a short grace period. Ordinary users can use the idle class; the realtime class (`-c1`) needs root and can starve other programs, so avoid it.

## How to check it worked

Run `iostat -xyz 5` again after your change. `await` and `aqu-sz` should fall, and `%iowait` in `top` should drop close to 0 when the server is quiet.

## Frequently asked questions

### What is a normal await value?

There is no single number. It depends on the disk type and request size. Measure when the server is healthy and compare with that baseline; a sudden jump is what matters.

### How do I measure maximum disk speed?

Use `fio` with a test file. It creates heavy load, so read [benchmark your VPS](https://help.freakhosting.com/portals/other/how-to-benchmark-your-vps.md) first.

### Why does iostat show different numbers the first time?

The first report is the average since boot. `-y` skips it, so you only see live values.

### Is high iowait always a disk problem?

Usually, but network storage and a full swap can also cause it. Check `vmstat 1 5` for swap activity (`si`/`so`) and the disk health with [smartctl](https://help.freakhosting.com/portals/other/how-to-check-disk-health-with-smartctl.md) on dedicated servers.

## Related guides

> [card] [VPS and dedicated server guides](https://help.freakhosting.com/portals/other/vps-and-dedicated-server-guides.md)
>
> Every server guide in one place.

> [card] [Benchmark your VPS](https://help.freakhosting.com/portals/other/how-to-benchmark-your-vps.md)
>
> fio, YABS and Geekbench.

> [card] [What is load average?](https://help.freakhosting.com/portals/other/what-is-load-average-on-linux.md)
>
> Why disk waits raise the load.

> [card] [Find what is using disk space](https://help.freakhosting.com/portals/other/how-to-find-what-is-using-disk-space-on-linux.md)
>
> du and ncdu.

> [card] [Check disk health](https://help.freakhosting.com/portals/other/how-to-check-disk-health-with-smartctl.md)
>
> SMART tests on physical disks.

> [card] [VPS Panel resource graphs](https://help.freakhosting.com/portals/vps-panel/how-to-monitor-vps-resource-usage.md)
>
> Disk activity over time.

***

> [!NOTE]
>
> **Checked against the [iostat(1)](https://man7.org/linux/man-pages/man1/iostat.1.html), [pidstat(1)](https://man7.org/linux/man-pages/man1/pidstat.1.html), [iotop](https://github.com/Tomas-M/iotop) and [ionice(1)](https://man7.org/linux/man-pages/man1/ionice.1.html) manuals** on 4 November 2026; commands tested on Ubuntu 24.04 LTS (sysstat 12.6.1, iotop-c 1.26). Commands can differ on other distributions or releases.

> [!NOTE]
>
> ### Need Extra Help?
>
> If you encounter any issues, our support team is ready to assist:
>
> * **Live Chat:** Quick assistance via our website.
> * **Support Ticket:** [Open a Ticket](https://freakhosting.com/clientarea/submitticket.php)
> * **Discord:** [Join our Community](https://discord.gg/freakhosting)
> * **Email:** [support@freakhosting.com](mailto:support@freakhosting.com)

> [!TIP]
>
> ### Save on Your Hosting
>
> Ready to upgrade your hosting? Use code **KB20** at checkout for **20% off** your first order!

***

**Last Updated:** November 2026


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.