What iowait values are ok?
Solution 1
iowait
, as a measure of system load, is only a problem inasmuch as it's consuming CPU time that could be reasonably used by other processes. If you've still got idle CPU time, then high iowait
(in and of itself) is not a problem.
On the other hand, a high iowait
can be a symptom of a problem; however, you really should be profiling your application to see if time spent in disk I/O is a significant percentage of the total time taken to complete a useful task. You cannot do this by looking at CPU stats, top
, htop
, iotop
, or any other system-level tool that people will try to recommend. You need to look at your application, and the way it works, to determine if changing disk I/O subsystem would be of any benefit in your application.
Solution 2
Disk utilisation is more important, you can measure that with:
iostat -xm 5
it will probably say close to 100%
alfish
Updated on September 18, 2022Comments
-
alfish almost 2 years
I am trying to find the bottleneck of a server running a fairly busy php/mysql site. My first culprit was io but iostat shows that on average iowait consumes only %3.60 of cpu time. here is the complete result of issuing iostat:
avg-cpu: %user %nice %system %iowait %steal %idle 65.78 0.00 8.52 3.60 0.00 22.10 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn sda 42.36 138.28 1754.70 408630278 5185216128
So I am wondering if the iowait is within acceptable range, and if not, whether switching from SATA to SSD would dramatically reduce it?
-
John-ZFS almost 13 yearscould you list what hardware does this server have? like how many disks, type & CPU, RAM?
-
Greg Petersen almost 13 yearsDid you take a look at
atop
orhtop
to see if you have any processes is eating RAM or CPU? You can also sort byIO_RBYTES
,IO_WBYTES
inhtop
. -
alfish almost 13 years@John/ZFS: The server has Xeon 3330 2.66GHz with 2x2TB WD hard disks and 8GB RAM
-
alfish almost 13 years@quanta: The two main consumers of RAM and CPU are mysql and php5-fpm
-
-
user16818402 over 3 yearsA bit of a necro-comment, but this answer does not seem to be very relevant with modern architectures any more. Here is a post that goes into some more detail, in case anyone else is also trying to wrap their head around these concepts.