7 ms·
Discovering Hard Disk Physical Geometry Through Microbenchmarking
- h2odragon 7y agoAstounding depth. Reminds me of tuning interleaves with SpinRite, some time before the old disk he's using was made.
- gameshot911 7y agoOne of the coolest articles I've seen in a long time!
- sgillen 7y agoReally glad people like the author exist. Who would do all this (presumably) on their own time, merely to satisfy their own curiosity. Bravo!
- shaklee3 7y agoYes, this is as detailed as the last article about c++ vs rust microbenchmarks. Excellent content, and likely tooka really long time to write.
- Nextgrid 7y agoI’m surprised this hasn’t (yet) been exploited in one way or another for fingerprinting.
- userbinator 7y agoSomething similar has been used for detecting faked drive specifications and rotational speeds: https://forum.hddguru.com/viewtopic.php?t=38333 https://forum.hddguru.com/viewtopic.php?t=38333 (That site and the HDDoracle one linked from there have lots of low-level information about hard drives, mostly in the context of data recovery.)
- userbinator 7y agoBy symmetry, there are two similar layouts that order cylinders from inside to outside, but I have not seen these used. That's because the fastest transfer speeds occur at the outside, and drives are filled starting from the first logical block (often the first set of files to appear on a drive is the OS), so it makes sense to. Interestingly, optical media (DVDs, CDs, BDs, LDs) start at the innermost radius so the fastest transfer speeds are at the end. On the other hand, bare optical media is handled physically and the outer edges are more likely to be damaged, so it makes sense to start on the inside (and the initial sectors contain critical information about the media, which if damaged would render it completely unreadable) --- I don't know if this is the official reason for the layout, but it's plausible. Here's an informative graphic comparison: https://en.wikipedia.org/wiki/File:Comparison_disk_storage.svg https://en.wikipedia.org/wiki/File:Comparison_disk_storage.s...
- codeflo 7y agoIIRC correctly, unlike HDDs, (audio) CD players change their rotation speed to match the data density, because they need the data at a constant bit rate. So it wouldn’t matter whether the data starts inside or outside. I think your argument about physical robustness is very plausible. Additionally, starting from the inside allowed for physically smaller disc formats without any special software support: https://en.m.wikipedia.org/wiki/Mini_CD https://en.m.wikipedia.org/wiki/Mini_CD I don’t know for sure if that possibility was part of the original design. But it must have been introduced somewhat early, given that every CD player tray I’ve ever seen has that extra ridge to hold the smaller discs in place.
- aasasd 7y agoPeople do approximately the same thing with flashbench on SD cards, to figure out the best alignment for more speed and less wear. RAID options of Ext4 are also exploited on both SD and SSD, to get the fs to align writes to desired block sizes. See https://wiki.gentoo.org/wiki/SDCard https://wiki.gentoo.org/wiki/SDCard and https://thelastmaimou.wordpress.com/2013/05/04/magic-soup-ext4-with-ssd-stripes-and-strides/ https://thelastmaimou.wordpress.com/2013/05/04/magic-soup-ex...
- hinkley 7y agoTurns out I had some exceedingly out of date ideas of how sectors are laid out on the platters. Now I understand some of the conversations about logical cylinder addressing when drives first started getting too big for the addressing scheme.
- SamReidHughes 7y agoOne other thing you might want to measure is how quickly you can do a write to disk. On some 2.5" WD Black drive I was benchmarking years back, I got a ~2 ms minimum time between uncached writes. Keep in mind it's 8.333 ms per rotation on a 7200 RPM drive. The simplest methodology is to perform a write at sector zero, wait until it's acked, then perform one at sector N, and see how low you can set N. It was a bit less than a quarter the way around the track. So if you wanted to optimize your file system for some sequential fsync workload (which iirc affected Firefox performance at some point), well, you might want strategically placed regions around disk for updating your write-ahead log. That drive burnt 230 μs just doing a cached write, which only took 30 μs (or 60?) on an Intel SSD, so there was a lot of fluff going on.
- hinkley 7y agoHe says that short stroking only improves iops by about 20%, which is nothing to sneeze at but also not that impressive.
- SamReidHughes 7y agoThe case I'm talking about is no-stroking, where you're on the same track.