Measure Data Read and Write Speeds for USB Flash Drives

Project Description

We have a few flash USB drives, including some old ones. As part of troubleshooting effort for another project (installing Anuko Time Tracker from https://www.anuko.com on USB), where an application performs poorly when running off USB drive, we need to benchmark / measure data read and write speeds for several USB flash drives.

Environment


Flash Drives to Test

Below is a photo showing all of these drives.

USB flash drives to test

USB flash drives to test



Micro SDHC card with USB 2.0 reader

Micro SDHC card with USB 2.0 reader




Formatting Drives

We can start with formatting drives using the Disks utility coming in Ubuntu. Formatting the old Sony flash drive in Overwrite existing data with zeroes (Slow) mode shows up as 6.1-5.9 MB/sec (megabytes per second), which gives us some indication of data write speed. Write speed is getting a bit slower towards partition end. Note: my experiments show that formatting speed does not change much between MBR (Compatible with all systems and devices) and GPT (Compatible with modern systems and hard disks > 2 TB) modes. I tried both with approximately the same outcome.

Formatting Sony flash drive

Formatting Sony flash USB drive: 5.9-6.1 megabytes per second



Formatting the Staples USB drive, which is USB 2.0, shows an improvement in write speed at 15.4 MB/s.

Formatting Staples flash drive

Formatting Staples flash drive: 15.4 megabytes per second



Formatting the newer Kingston DataTraveler USB drive, which is USB 3.0, is not much different from USB 2,0 with write speed of 15.7 MB/s.

Formatting Kingston flash drive

Formatting Kingston flash drive: 15.7 megabytes per second



Formatting SanDisk Micro SDHC cart over USB 2.0 reader: 11.2 MB/s.
Formatting SanDisk Micro SDHC cart over UGREEN USB 3.0 hub: 13.9 MB/s.


Benchmark Data Speed Testing

Ubuntu 16.04 LTS Disks utility also has a useful Benchmark disk feature, which we could use to measure read and write speeds. The following list summarizes test results for all test drives. with default test settings on sample size 10,485,760 bytes, 100 samples. MB/s below means megabytes per second.

Note: these results should be treated as approximate. I observed them fluctuate significantly (up to 20% or so) in repeated tests.







And, for comparison with SSD speeds:



Connecting via USB 3.0 Hub

The second option in each group above: via USB 3.0 hub over near back port means that I additionally tested the drives connected to a USB 3-port hub as on the photo below, while the hub itself was connected to a USB 3.0 port on the back of my PC. This product is made by UGREEN (Ugreen Group Limited) in China and has Multiport Adapter name on the front of the box, and UGREEN USB 3.0 hub (... card reader, Black) NEW sticker on the back.

UGREEN USB 3.0 hub

UGREEN USB 3.0 hub



Note: the hub has a little white LED built in (see the photo below). I purchased it because I thought it indicates data transmission as built-in LEDs in some of USB drives. I was wrong. It lights at all times when connected without indicating data transmission events. This LED (or even 3 separate LEDs, one for each port) would be much more useful, if it indicated data transmission taking place.

LED on UGREEN USB hub is always on

LED on UGREEN USB hub is always on



Conclusion

Although write speeds for newer drives appear somewhat below that of an old USB 2,0 unit from Staples, read speeds are significantly better. Therefore, if we have an application that mostly reads from drive and writes little, there is a benefit of using a newer drive.

Another thing to note is that write speed during formatting shows up significantly higher, as compared to benchmark write tests. This probably means that benchmark data are a bit close to reality of having a real application writing data at random partition locations.

Connecting via a hub does not seem to slow things down at all. Some tests actually show an improvement. I don't know how to explain this. Perhaps, due to fluctuations in testing environment.

Also, a Micro SDHC card shows much better write speeds than flash drives, when connected via a USB 3.0 hub, which makes it a better candidate for write-intensive applications.

For a write-intensive application, approximate write speeds in MB/s and percentage look as foolows:


.