I learnt about this interesting
blog post entitled, "Discovering Hard Disk Physical Geometry through Microbenchmarking" by Henry Wong (2019)
via
@TanelPoder on Twitter.
As the title suggests, it is about applying so-called disk drive
microbenchmarking to reveal information about the internal mechanical configuration and data layout that is not typically available with other HDD microbenchmark codes; many of which are cited by the author in the References section (something most bloggers are too lazy to do).
While reading it I had some thoughts that turned out to be too long for tweeting a response.
So, here I am revisiting my traditional blog, mostly for the formatted space it provides, but also to remind myself that it still lives!
The Article
The article contains a massive amount of very admirable work (~1 year of effort, including benchmark code development) that is exceptionally well written, considering all the details that are covered. I didn't come across any typos or misspellings, either.
There are actually TWO articles in one: an extensive summary analysis (not an Executive Summary) and an equally long Appendix containing the detailed measurements obtained from each disk model that was benchmarked.
Quite apart from my subsequent remarks below, the inferences about internal disk structure drawn from the microbenched timing-data are quite remarkable.
And the beautiful plots generated from those data (e.g., mapping thousands of sector defects) are something to behold. Understandably, HDD manufacturers are not keen to include such plots in their marketing collateral.
The author states the following as his prime motivations for developing the extended microbenchmark algorithms.
"I had initially set out to detect the number of platters in a disk
without opening up a disk, but in modern disks this simple-sounding
task requires measuring several other properties before inferring
the count of recording surfaces."
"Many of the prior works had practical applications in mind (as opposed to pure curiosity), and were willing to trade measurement speed for a small loss in accuracy.
Although [my microbenchmark] algorithms are not fundamentally different, prior work
likely avoided exploring these because these measurements can take many
hours and there is little practical benefit for applications such as
performance modelling or improving data layouts in filesystems."
Although a truly laudible effort, that is largely driven by scientific "curiosity", I can't help but wonder if the author is straining at a gnat.
With a bit of perseverance, I could find several corresponding drive specs online.
And, although manufactuers never lie (smirk) the search terms can vary widely.
Platters = disks = discs...
Surfaces = heads = actuators...
Applying the author's terminology:
- The number of discrete platters has to be an integer.
- The number of surfaces is an even integer (each platter having two sides).
But, that's not what you see in the Summary table of the 17 HDD models that he tested. Let's look at a few examples.
Example Geometries
The following disk models were compared against their respective manufacturer specs that I was able to find online.
- Tosh X300 5GB has 5 platters and therefore 10 surfaces (1 Gig per platter).
- Seagate ST1 5GB has 1 platter and therefore 2 surfaces.
- WD S25, however, has 2 platters but only 3 surfaces. How can that be?
Western Digital built this disk with only 3 actuator arms, not the expected 4. The fourth surface isn't used.
Only WD knows why. Cost cutting is one plausible explanation. There is no way to anticpate such quirks. You either have to measure it or
read about it.
The author infers the same number of WD S25 used surfaces (3) based on his benching data which, in itself, is quite remarkable.
On the other hand, this same information is generally included in the disk manufacturer specs (or similar docs).
Worst case, you could actually contact the manufacturer and they would very likely tell you; especially if they thought they could sell you some disks.
Bitter Pill
However, even when you determine all these interesting extended disk metrics (measured, calculated or specified), you are no
better off when it comes to using that information for better storage performance — as the author admits (see quote above) — or predicting future HDD internal geometries. Just like with modern multicore microprocessors,
- control (especially that related to performance) has progressively been taken away from you and placed inside a silicon module. You can't blue-wire that. Similarly for HDD packaging.
- manufacturers tend to implement the cheapest solutions not the best performing solutions, which you can't correct.
See WD S25 above. Similarly for HDD controller logic.
The HDD microbenching measurements described in the 2019 article would have to be repeated on each new model release. Any mechanical tweaks or other changes inside the new disk would have to be discovered and then incorporated into updated microbenchmark code ... if possible.
Computer manufacturers of all stripes are in business to make a profit and to avoid being eaten by the competition. They will do whatever it takes (good, bad or ugly), whenever it's deemed necessary, to maintain or improve their market position. An unfortunate casuality of this ongoing commercial warfare is that any painstakingly acquired scientific analysis can become an historical footnote overnight.
Performance Modeling
On the topic of performance modeling of disks (to which the author also alludes), his article is a good reminder of the mind-boggling complexity of data layout in modern disks. And that's essentially just the
static picture. Along with that goes the complex
dynamics of local request-chain caching and optimization.
In that vein, it's a fool's errand to try and model individual modern disks.
In principle, you would need to construct a simulation model to handle all the potential transient behaviors. But that, in turn, requires deciphering the embedded controller algorithms, which are not only highly complex but proprietary. You'll never figure them out and no manufacturer will ever reveal them. So, a performance simulation is actually a non-starter.
On a more positive note, there is a surprisingly counterintuitive technique for constructing accurate performance models of collective disks, like SANs, using the PDQ (Pretty Damn Quick) performance analyzer.
That's something I demonstrate in my Guerrilla Capacity and Performance (GCAP) classes.
Related Posts