1

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.

Kiva
  • 155
  • 2
  • 8

2 Answers2

1

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.

user34092
  • 71
  • 1
0

-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.

Helvick
  • 20,019
  • 4
  • 38
  • 55