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.

My web site server is very slow and I contacted my hosting company. This company ask me to execute this command line:

hdparm -tT /dev/sda

The result is here:

/dev/sda:
 Timing cached reads:   1112 MB in  2.00 seconds = 555.55 MB/sec
 Timing buffered disk reads:    4 MB in  4.80 seconds = 854.16 kB/sec

I don't understand what it means, I read the man but can you explain me clearly what this result means.

Thanks a lot.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

First, that is ridiculously slow ... as in slower than internet access slow. Our web server, which cost only $1800 almost 7 years ago, gives these stats for hdparm -tT :

 Timing buffer-cache reads:   1836 MB in  2.00 seconds = 918.00 MB/sec
 Timing buffered disk reads:   98 MB in  1.95 seconds =  50.26 MB/sec

The first speed shows how fast disk reads are if the data is already buffered. The disk is never accessed, so it is probably pretty meaningless for a web server (since most of the time disk reads will probably not be buffered).

The second stat shows real hard drive read performance. In your case, it means that the web server is reading under 1 MB/sec. If you have a database on the same server, it should be moved to a separate server, as scanning even small tables could take seconds.

share|improve this answer
    
Thanks a lot, your description is clear. –  Kiva Feb 7 '10 at 15:31
    
Thanks Kiva - make sure to vote up (and/or select as answer) for helpful answers. –  user34092 Feb 7 '10 at 18:13
    
I can't do this, my reputation is too low. –  Kiva Feb 9 '10 at 11:12
add comment

-T is testing the OS disk cache read speed. This reflects the performance of read operations for data that already cached and tells you the sort of data rates you can expect for data that is frequently requested and can be expected to be fully cached. It's really telling you more about main memory bandwidth than anything to do with the disk's themselves.
-t is testing the actual read rate of the underlying disks. This bypasses the OS Disk cache and is giving you an indication of the sort of data rate you can expect for sustained reads of data from the disks themselves.

These tests will only really reflect the actual systems if the server is not busy doing other things. Using it while it's running production loads will give you an idea of the amount of headroom you have available at the point in time that its run which is a useful metric.

In your case 854.16 kB/sec is a pretty low number for unbuffered reads. I'd expect that even a relatively slow modern drive to bring in numbers >50Meg/sec. In your case I'd guess that your server is currently overloaded with disk activity and hdparm is telling you that it is pretty much maxed out.

The exact reasons for this are another question - it might be just busy with heavy disk IO activity, there might be a driver\settings issue, there might be physical problem either with a single drive having read problems or with a RAID pack going through a rebuild.

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.