5 ms·
No, it is not false. The important thing with a spinning disk is locality of reference. You want the blocks which store the file content to be as close together
by fuzzbang 13y ago
No, it is not false. The important thing with a spinning disk is locality of reference. You want the blocks which store the file content to be as close together as possible, to minimize the head seek times. This means you want as long a chain of contiguous blocks as possible. This does not mean that you want all those blocks to be at the beginning of the disk. In fact, the exact opposite. You want to start that chain at a random location so you are more likely to have a large number of contiguous unallocated blocks. See the implementation of HFS+ Extents, or Ext4, or UFS for examples of how this works.
- nknighthb 13y agoA) You have forgotten basic physics. The beginning of the disk is faster. Locality is desirable but is not and has never been the only thing that matters. B) You have just named three uncommon filesystems that few people will ever use in the first place, much less with TrueCrypt.
- schrodinger 13y agoHFS+ is not exactly uncommon
- nknighthb 13y agoAs a full-time Mac user for 8 years, and a Linux user for much of the decade before that, I am acutely aware of how common many filesystems, including HFS+, actually are. If OS X ever breaks 10% (and still uses HFS+ at that time), I'll reconsider my judgement of its commonality.
- schrodinger 13y agoIt's over 7%, I still wouldn't call that uncommon and say few people use it. http://en.m.wikipedia.org/wiki/Usage_share_of_operating_systems http://en.m.wikipedia.org/wiki/Usage_share_of_operating_syst...
- davidcuddeback 13y agoI'm writing this from a computer with two partitions: one HFS+ running OSX and one Ext4 running Linux. These are both the default options when installing OSX (Mountain Lion) and Ubuntu 12.04, respectively: https://www.dropbox.com/s/x3cluigwaog8sad/gparted.png https://www.dropbox.com/s/x3cluigwaog8sad/gparted.png
- nknighthb 13y agoOf course you are. And if you took a poll of HN users, you might even find OS X + Linux near a majority. That has nothing at all to do with what filesystems the vast majority of people are using, much less what they'd be using with TrueCrypt.
- nitrogen 13y agoA) You have forgotten basic physics. The beginning of the disk is faster. Locality is desirable but is not and has never been the only thing that matters. If you haven't actually looked at the block allocation patterns of common filesystems, then you can't say conclusively that fuzzbang is incorrect. Arguments from first principles (e.g. "basic physics") cannot override empirical evidence. Further, locality of reference will have a much, much bigger influence on spinning disk I/O throughput than location at the front of the disk. The difference between the outer rim and inner rim might be 120MB/s to 70MB/s, so reading a contiguous 200MB file will take 1.7x as long if it's stored at the inner rim (286ms vs 167ms). However, if that 200MB file is stored in 100 2MB fragments, and seeking to each fragment takes 4ms, your reading time will be dominated by the seek time due to fragmentation (686ms vs 567ms, or a mere 1.2x difference). Based on my experience I'm inclined to accept fuzzbang's description of block allocation strategies. It used to be common wisdom that you could defragment a volume by copying all the data off, formatting it, then copying the data back on. I did this once with an NTFS volume (using ntfs-3g), then checked the resulting data in the Windows disk defragmenter. The data was primarily located around the center of the volume, with numerous gaps. Filesystems leave gaps to allow room for files to expand. B) You have just named three uncommon filesystems that few people will ever use in the first place, much less with TrueCrypt. "Commonness" for the purposes of forensics is a much lower bar than for market analysis. I'd also wager that, servers included, there are at least as many ext2/ext3/ext4 volumes on the planet as NTFS volumes.
- nknighthb 13y ago> If you haven't actually looked at the block allocation patterns of common filesystems I have. > you can't say conclusively that fuzzbang is incorrect And I can. I'm aware of the degree of difference in speed. It is sufficient that it is standard practice for filesystems to be restricted to the first 1/4-1/2 of a spinning disk in performance-sensitive applications. Or at least it was, in the last few years we've become more likely to just use SSDs or keep everything in RAM. > if that 200MB file is stored in 100 2MB fragments Thank you for assuming I don't even have the knowledge of a typical computer user, it greatly increases the likelihood I'll not waste further time with you. Raises it, in fact, to 100%.
- deleted 13y ago[deleted]