4 ms·
On rotating media, I assume copies=n might improve performance... By multiple copies of a piece of data existing, whichever piece of data is closest to the r
by londons_explore 6y ago
On rotating media, I assume copies=n might improve performance... By multiple copies of a piece of data existing, whichever piece of data is closest to the read head can be read. Rotational delays on a 7200 RPM risk are about 10 milliseconds, so if you can halve that by picking a closer copy of the data, you'll get your data back quicker!
All this depends on the filesystem issuing reads for all the copies, the drive firmware correctly deciding which to read first, and then the OS being able to cancel the reads of the other copies.
I kinda doubt all the above logic is implemented and bug free... Which is sad :-(
- qeternity 6y agoI highly doubt that logic is implemented.
- mulmen 6y agoThis sounds far fetched but I was surprised to learn how precise timing can really be. I believe it was a conversation about bluetooth proximity unlocking. Computer clocks are fast enough to measure distance to an object in human distances at light speed. That still blows my mind.
- garmaine 6y agoIt's the most intuitive explanation of the 2-3GHz limit that I know of: at those clockrates, the speed of light is about 1 m/s. Factor in the slower speed of electrical signaling in metals and semiconductors, and it is properly measured in cm/s.
- yarg 6y agoA minor quibble: your unit of time should be nanoseconds.
- skykooler 6y agoA minor point: you can't really measure distances by the speed of light via Bluetooth, the protocol is too coarse-grained. Bluetooth distance measurements are usually done via signal strength. However, time-of-flight distance measurements can be done on an extension of wifi called 802.11v - this is how the Apple Watch proximity unlock works, for example.
- mbreese 6y ago> this is how the Apple Watch proximity unlock works, for example. I wonder — do you know if the proximity unlock only detect the relative distance between the computer and AP and compare that to the distance between the watch and AP? Or is it between the watch and computer? The former would make sense to me, because my proximity unlock doesn’t always work immediately and it would make sense if it was because my watch and computer were connected to two different APs in my house (because one of the other hasn’t switched to the closest AP yet).
- skykooler 6y agoIt is the direct time of flight between the computer and watch. However, the way Apple implemented it, the devices both connect to an AP first to mediate the connection; it's similar to how Airdrop connects two computers.
- mulmen 6y agoAh, that may have been it, thanks! The fact it is possible with any consumer electronics at all amazes me.
- midasuni 6y agoHow do covid Bluetooth apps work then?
- paxswill 6y agoThey're using the coarser, signal strength based estimation.
- tinus_hn 6y agoTypical kernels don’t consider rotational latency at all because seek latency is so much more important. Besides, the disk layout isn’t really available to the OS anyway, what the OS sees is an abstraction managed by the drive firmware.
- namibj 6y agoWhich is almost always a linear mapping going from the outside first. To be fair, that doesn't include rotational latency, but still, the abstraction isn't as abstract as you make it sound.
- tinus_hn 6y agoHow does that tell you how many sectors are in one track or how many heads are there? Presenting the drive that consists of sectors in tracks on platters as if it is a very long string of sectors, how more abstract can you get? And that’s ignoring reallocated sectors and shingled recording shenanigans.
- namibj 6y agoI'd not be surprised if they since switched to using a true spiral. And the head count is one assembly per disk-surface for almost all devices. So 2 per disk for HDDs. Yes, reallocated sectors aren't accounted for, but they should be so rare as to not matter outside of hard realtime applications, which shouldn't be using such corner-cutting devices anyways. That spiral assumption is due to the servo tracks they need and that the inter-sector gap only has to be sized to account for how fast they can switch the write head from idle to spewing bits, so they have incentive to make it smaller than what they'd likely want the head to be able to jump when continuously streaming data. Multiple platters would likely just mean that random writes with suitable alignment cost the same until you reach the effective platter count, as the sectors that fly by at the same time should be sequential. SSDs on the other hand use some complicated LSM trees or similar datastructures.
- Someone 6y agoThat’s why, back in the day, some people carefully placed often-accessed data in the middle of the disk. I think that’s a long lost art, but it still might be done on mainframes (on the really old ones, files were mostly pre-allocated, with individual items stored in a partitioned data set (https://en.wikipedia.org/wiki/Data_set_(IBM_mainframe)#Partitioned_data_set https://en.wikipedia.org/wiki/Data_set_(IBM_mainframe)#Parti...), so you could have some control where individual ‘files’ in a ‘directory’ got stored. Nowadays, you would have to partition a disk to do that) I don’t think it has been cost effective to even think of this kind of black magic for decades, though.
- dehrmann 6y agoThis would be a strategy for managing fragmentation. The main ways filesystems manage this are defragmentation and not filling up the disk on the first place. For performance, given a choice of copies=2 or 50% usage, I'd take 50% usage.