Monday, April 13, 2015

Hard Drive latency with USB3

When people think of ways to connect a hard drive to a computer, the main factor they consider is speed. But let's say the hard drive is slow enough so that it will not saturate the interface, then what else to consider? My next thought was latency, which you can consider as the acceleration, as the data rate is the speed. I found this tool called ioping on GitHub and decided to give it a try. Although I do not have a Thunderbolt drive, I will compare my USB3 5200rpm drive, my retina iMac pcie 256GB SSD internal drive, and an Intel 530 SSD connected to a NexStar CX USB3 enclosure.

APPLE SSD SM0256F via PCIe 20 requests completed in 6.66 ms, 80 KiB read, 3.00 k iops, 11.7 MiB/s
min/avg/max/mdev = 7 us / 332 us / 842 us / 385 us
WD My Passport Ultra Metal Edition via USB3 20 requests completed in 464.3 ms, 80 KiB read, 43 iops, 172.3 KiB/s
min/avg/max/mdev = 10 us / 23.2 ms / 66.2 ms / 27.1 ms
Intel 530 SSD via USB3 20 requests completed in 206.5 ms, 80 KiB read, 96 iops, 387.5 KiB/s
min/avg/max/mdev = 8 us / 10.3 ms / 170.5 ms / 36.8 ms

So as expected, the internal flash drive is over 30 times faster on average than using an external USB 3 flash drive. On the same USB 3, the flash drive is about twice as fast on average than the HDD. Unfortunately, as mentioned, I do not have a Thunderbolt drive to compare it to. But I would guess that although it will not be as fast as the internal flash drive since the Thunderbolt controller will add some latency, it would be much faster than the USB3 interface. Looking at reviews online for the same Intel 530 SSD connected via Thunderbolt, the latency average seems to be about 750us. That would mean that it is around 14 times faster than on USB 3!

Is accessing data on your hard drive 14 times faster worth the higher cost of Thunderbolt? (Do remember, this is not read/write speed, but the latency/delay in accessing data). Unless you are working with lots of random data/files scattered throughout the drive, most users will not notice the difference. If you are just accessing your media files, document, etc..., a USB 3 drive is fast enough. But for something like an Operating System, that does lots of reads and writes all over the place, I believe the 'lag' would be noticeable.