View Single Post
Old 16th June 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Disk drive performance tuning in the deep dark ages -- another history lesson

Disk drives are mechanical devices. A disk I/O, consisting of one (or more) sector reads or writes, is typically measured in milliseconds. What takes so long?
  • Seek time -- the moving of the head assembly to the cylinder, the collection of tracks underneath the heads, where the (first) sector resides.
  • Rotational delay -- waiting for the (first) sector of interest to make its way under the head
  • Data transfer -- the time it takes to move data onto or off of the sector(s), into the drive electronics, for transmission down the bus/channel to the OS.
There are other possible I/O delays, such as delays caused by the I/O channel being busy with transfers for other devices, but the focus of this post is on an individual drive performance.

Minimizing drive delay -- part one

At one time, the best practice for paging (swapping) spaces was neither to provision these data sets at the inner platter edge, nor the outer platter edge. Instead, the best performance was to set them at the center section of the platters. This minimized seek time. In addition, on those drives that were used for paging/swapping, best practice was to place lightly accessed data on the rest of those drives, or leave the space unallocated. Heavy use data was placed on other drives in the farm.
This may seem unfathomable in this day and age, where low-end machines are shipped with 160GB or 300GB drives, and +1TB drives are common. I speak of a time when a large drive held less than 0.5 GB, and a computer might have a dozen or more such drives attached.
Minimizing drive delay -- part two

Sometimes, when reading (or writing) a series of sectors, the timing would be such that the next sector in the group would be missed. Perhaps the sequence of sectors moved to a different platter in the cylinder, or there was a speed differential between what the drive electronics could manage and the sectors speeding along on the spinning platter under the head. This "woops, gotta wait now" rotational delay is known as an RPS Miss. RPS, if you bothered to read a prior post above, is Rotation Position Sensing.

On some drives, the sector number layout on the drive was non-sequential, so that the electronics could keep up with the rotation speed, or vice versa. This difference was known as interleave, and for many devices, this could be changed by the system administrator at disk format time. If so, this was set by a "low level format" done by the drive electronics, not by the OS. After the interleave was set, the drive could be formatted, data could be loaded on it, and performance may have changed, for better or for worse. You might have found a recommendation for your application and OS, but mostly, this was trial-and-error, test-and-retest to find an optimal setting.... if you could.

The value of altering an interleave setting was to minimize RPS Miss. And the reason that this was an operator-selectable setting was because I/O patterns are application dependent, and the application data layout across CHS maps was implementation dependent on disk drive geometry, OS, filesystem, etc.

Minimizing drive delay -- part three

Along with doing their own geometry mappings with drive electronics, those disk drive manufacturers found that if they added read caches to their electronics .... they could watch a pattern of I/Os to the drive and anticipate sequential read requests, and read those sectors into the RAM on the drive electronics. Before they were asked for. In the event the OS asked for the sectors, they could send those bytes back immeidately at bus/channel speed. No seek. No rotational delay. No data transfer from the drive.

-------

The OS is now divorced from drive geometry, as discussed in prior posts. Cache read-ahead is done automatically, and that process is a black box for the OS as well, and the algorithms differ between drive manufacturers, and perhaps model to model. RAID arrays further divorce a logical drive from physical I/O, and volume management tools (e.g. ZFS) obfuscate things further.

It is my opinion that "disk drive performance tuning" from intentional data layout on a modern, large physical drive is effectively impossible, and practically meaningless. They have hidden geometry. Hidden cache algorithms. There is so much data on one drive that we do not have consistant I/O patterns. Additional layers of volume management or storage array management make the divorce from physical location complete.

This is, of course, just my opinion. But don't let 35 years in IT, with nearly a decade of that as a senior manager for a storage systems vendor hold any sway. I could be wrong.
Reply With Quote