TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Discovering Hard Disk Physical Geometry Through Microbenchmarking

152 pointsby rrampageover 5 years ago

8 comments

userbinatorover 5 years ago
<i>By symmetry, there are two similar layouts that order cylinders from inside to outside, but I have not seen these used.</i><p>That&#x27;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.<p>Interestingly, optical media (DVDs, CDs, BDs, LDs) start at the <i>innermost</i> 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&#x27;t know if this is the official reason for the layout, but it&#x27;s plausible. Here&#x27;s an informative graphic comparison:<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;File:Comparison_disk_storage.svg" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;File:Comparison_disk_storage.s...</a>
评论 #21494309 未加载
SamReidHughesover 5 years ago
One other thing you might want to measure is how quickly you can do a write to disk. On some 2.5&quot; WD Black drive I was benchmarking years back, I got a ~2 ms minimum time between uncached writes. Keep in mind it&#x27;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&#x27;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.<p>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.<p>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.
评论 #21495433 未加载
aasasdover 5 years ago
People 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 <a href="https:&#x2F;&#x2F;wiki.gentoo.org&#x2F;wiki&#x2F;SDCard" rel="nofollow">https:&#x2F;&#x2F;wiki.gentoo.org&#x2F;wiki&#x2F;SDCard</a> and <a href="https:&#x2F;&#x2F;thelastmaimou.wordpress.com&#x2F;2013&#x2F;05&#x2F;04&#x2F;magic-soup-ext4-with-ssd-stripes-and-strides&#x2F;" rel="nofollow">https:&#x2F;&#x2F;thelastmaimou.wordpress.com&#x2F;2013&#x2F;05&#x2F;04&#x2F;magic-soup-ex...</a>
sgillenover 5 years ago
Really glad people like the author exist. Who would do all this (presumably) on their own time, merely to satisfy their own curiosity.<p>Bravo!
评论 #21493927 未加载
h2odragonover 5 years ago
Astounding depth. Reminds me of tuning interleaves with SpinRite, some time before the old disk he&#x27;s using was made.
hinkleyover 5 years ago
Turns out I had some exceedingly out of date ideas of how sectors are laid out on the platters.<p>Now I understand some of the conversations about logical cylinder addressing when drives first started getting too big for the addressing scheme.
gameshot911over 5 years ago
One of the coolest articles I&#x27;ve seen in a long time!
Nextgridover 5 years ago
I’m surprised this hasn’t (yet) been exploited in one way or another for fingerprinting.
评论 #21493885 未加载