As much as I have read about iowait, it is still mystery to me.
I know it's the time spent by the CPU waiting for a IO operations to complete, but what kind of IO operations precisely? What I am also not sure, is why it so important? Can't the CPU just do something else while the IO operation completes, and then get back to processing data?
Also what are the right tools to diagnose what process(es) did exactly wait for IO.
And what are the ways to minimize IO wait time?
Best Answer
Yes, the operating system will schedule other processes to run while one is blocked on IO. However inside that process, unless it's using asynchronous IO, it will not progress until whatever IO operation is complete.
Some tools you might find useful
iostat
, to monitor the service times of your disksiotop
(if your kernel supports it), to monitor the breakdown of IO requests per processstrace
, to look at the actual operations issued by a process