Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
could you list what hardware does this server have? like how many disks, type & CPU, RAM? –  John-ZFS Aug 5 '11 at 2:26
    
Did you take a look at atop or htop to see if you have any processes is eating RAM or CPU? You can also sort by IO_RBYTES, IO_WBYTES in htop. –  quanta Aug 5 '11 at 3:06
    
@John/ZFS: The server has Xeon 3330 2.66GHz with 2x2TB WD hard disks and 8GB RAM –  alfish Aug 5 '11 at 15:03
    
@quanta: The two main consumers of RAM and CPU are mysql and php5-fpm –  alfish Aug 5 '11 at 15:11
add comment

2 Answers

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.

share|improve this answer
add comment

Disk utilisation is more important, you can measure that with:

iostat -xm 5

it will probably say close to 100%

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.