View Single Post
  #6   (View Single Post)  
Old 27th May 2013
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

I'm going to try to describe RPS miss in more detail, since when it occurs it is outside your control on modern drives.

For this example I shall pick a SATA drive currently being marketed: somewhat at random, I chose the first "internal PC hard drive" for sale today at www.newegg.com: the "Seagate Barracuda 7200.14 ST3000DM001 3TB 7200 RPM 64MB Cache SATA 6.0Gb/s 3.5" Internal Hard Drive. Per Seagate, this drive has a sustained data rate on the outer diameter of 210 MB/s. The SATA bus transfers at a higher rate, of course, but 210 MB/s is the physical limit the drive has to read from or write to the platters. The average transfer rate for this drive is 156 MB/s.

The PDF spec sheet for the drive describes average seek times as 8.5 ms for reads and 9.5 ms for writes -- this is the time it takes to move the head assembly to the appropriate physical cylinder. If the heads have to move, this is the average time it takes to move the heads before reading or writing may occur. And note that any time the heads have to move again ... its another 8.5 or 9.5 ms on average to move the heads. 9ms for a read or a write, on average.

This is a 7200 RPM drive. The platters rotate in a complete circle every 8.33 milliseconds. (60 seconds / 7200 rotations). Once the heads have completed their seek to the appropriate cylinder, the platters must spin until the first sector to be read or written is underneath the appropriate head. This will average 4.16 ms ... the "latency" shown in the marketing literature.

Let's look at the drive transfer rate: maximum: 210 MB/s. Average (mid platter) 156 MB/s. I can estimate that the slowest (inner platter) transfer rate would be 102 MB/s. These are 4096 byte sectors - the fastest read/write of a single sector is 18.6 microseconds along the outer cylinder, and I estimate the slowest transfer is 38.3 microseconds.

However, this does not account for head movement (seek). Add seek and the difference between the inner and outer cylinders is negligible: 9018.6 microseconds vs 9038.3 microseconds on average to seek and read or write.

Now, add RPS Miss, or in modern terms, "latency": the average time spent waiting for the platters to spin to the appropriate sector under the heads. The new average for a read or write after a seek is 13178.6 microseconds for a sector on the outer edge, or 13198.3 microseconds on the inner edge.

You have no control over seeks or over latency (RPS Miss), as the physical mapping has nothing to do with the mapping of sectors reported to the OS by the drive. The drive manufacturers add caches and for sequential sector reads, at least, the electronics will usually attempt to read-ahead in order to pre-populate the cache with the next set of expected sectors.

You can't know if sector mapping as presented to your OS has anything to do with physical mapping. If you conduct performance tests of what appear to be inner and outer cylinders, you may see no appreciable differences, or any differences may be accounted for in the sequential or random nature of your I/O requests and how many cache hits the electroncs can provide based on the amount of read-ahead sectors.

Last edited by jggimi; 27th May 2013 at 03:16 PM. Reason: corrected latency microseconds
Reply With Quote