Ubuntu – Identifying what is causing High IO (Linux, Ubuntu)

performanceUbuntu

Your Linode, linodeXXXXX, has exceeded the notification threshold (1000) for disk io rate by averaging 1079.99 for the last 2 hours.

That's what I've been getting in my email for the past week, about 2-3 a day. I tried a few solutions, including finding other ServerFault posts on this issue, but they are not helping.

For example, I tried:

watch -n 1 "(ps aux | awk '\$8 ~ /D/  { print \$0 }')"

At various intervals, this will populate with an nginx process, or a kjournald process, etc but only for a few seconds. So it doesn't really help in figuring out what's causing it, it just tells me I keep getting high i/o.

Thus, the question becomes How can I identify what is causing this high i/o usage? Ideally, without starting at a process list for 6 hours.

Best Answer

Install and run iotop. The topmost processes in the iotop display are very likely the ones generating the majority of the I/O requests in your VM.