4 ms·
I'm really interested in how you benchmarked that? Is there a "simple" way to specify the physical location on a HD data should be written to?
by ascar 7y ago
I'm really interested in how you benchmarked that? Is there a "simple" way to specify the physical location on a HD data should be written to?
- wtallis 7y agoHard drives generally use a fairly simple linear mapping between LBAs and physical location. Low LBAs are on the outer edge of the platter where transfer speeds are highest, and high LBAs are on the inner edge where speeds are lowest. Unlike SSDs, hard drives don't need wear leveling, so there's no reason to break from that pattern except in the relatively rare instance of damaged sectors. At smaller scales, the layout of individual tracks can vary quite a bit, but that doesn't have as much impact on overall sequential transfer speed. See http://blog.stuffedcow.net/2019/09/hard-disk-geometry-microbenchmarking/ http://blog.stuffedcow.net/2019/09/hard-disk-geometry-microb...
- zozbot234 7y agoYour link was discussed @ https://news.ycombinator.com/item?id=21492345 https://news.ycombinator.com/item?id=21492345
- wtallis 7y agoYep. I found it interesting enough to bookmark, and now I tend to pull it up when somebody wants to know how hard drives really work.
- mehrdadn 7y agoLow LBAs are outside rather than inside?? I had no idea.
- wtallis 7y agoIt stands to reason. The low LBAs get filled first and used most. The outside of the disk is where the linear speed is fastest, and it's closest to where the heads park.
- mehrdadn 7y agoYeah I understood that immediately after I read it, but it's not how typical optical discs work, and I'd just assumed they work the same way until now. Hadn't really thought about it before. What I find a bit bizarre though that some defragmenters have an option to move files to the end of the drive. Wouldn't you want to move files to the beginning in that case?
- kalleboo 7y agoMaybe if you're optimizing for write performance of new files (e.g. back in the day when sequential disk performance was more of a bottleneck, you'd want lots of contiguous free fast disk space for something like digitizing video)
- toast0 7y agoTo build on the sibling comment, the simple way to benchmark this is with an empty hard drive, make a series of partitions in order: 1) start of drive partition 2) spacer 3) middle of drive partition 4) spacer 5) end of drive partition Make 1,3, and 5 the same size, and then run raw disk benchmarks against them. The usual pattern is, like a record, the data begins at the edge of the platter and you'll get higher transfer speeds, and the end of the disk is in the middle, so slower there.
- nitrogen 7y agoThere are also dedicated benchmarking tools that will plot disk performance as a function of LBA (logical block address). Also worth pointing out that sticking to the front of a spinning disk doesn't just help throughput, it also helps latency as the head doesn't have to move as far.
- JoshTriplett 7y ago> I'm really interested in how you benchmarked that? You can benchmark disks, including seek time and speed at different points, using the tools "bogodisk" and "bogoseek": https://djwong.org/programs/bogodisk/ https://djwong.org/programs/bogodisk/
- Dylan16807 7y agoHDTune is a very simple benchmark tool that shows it off. http://www.hdtune.com/HDTune_Benchmark.gif http://www.hdtune.com/HDTune_Benchmark.gif
- sliken 7y agoJust open /dev/sda and run a while loop doing an fread and time each one. You'll end up with a graph like: http://broadley.org/disk/consumer-no-vibration.png http://broadley.org/disk/consumer-no-vibration.png Unless of could you put a consumer disk in a server with many high RPM fans causing substantial vibration, then you get: http://broadley.org/disk/consumer.png http://broadley.org/disk/consumer.png A server/enterprise/RAID edition disk handles the vibration MUCH better, around 3x the bandwidth: http://broadley.org/disk/server.png http://broadley.org/disk/server.png