Pegasi Wiki

This wiki acts as a memo for our own work so why not share them? Feel free to browse and use out notes and leave a note while at it.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

usb_transfer_rates [2019/06/24 11:13] (current)
Pekka Kuronen created
Line 1: Line 1:
 +===== Linux USB stick transfer block size test =====
  
 +==== Overview ====
 +
 +I have two USB stick drives
 +  * Kingston Datatraveler 8GB: a compact keychain drive with USB2 support
 +  * Kingston Datatraveler Elite G2 64GB: almost-keychain sized drive with USB3 support showing good numbers in advertisements
 +
 +With this test I wanted to compare their performance as well as find out the optimal block size of dd transfer from SSD hard drive to USB.
 +
 +It turns out that the block size makes a huge difference.
 +
 +==== Test environment ====
 +
 +I tested block sizes from 512 to 64M starting with default dd block size which seems to be 512. 
 +
 +I used a 80MB iso image, direct writing without cache using command
 +
 +<​code>​
 +dd iflag=direct if=<​infile>​ of=</​dev/​usbdevice>​ bs=<​block size>
 +</​code>​
 +
 +and dropped cache between tests using following command:
 +
 +<​code>​
 +echo 3 > /​proc/​sys/​vm/​drop_caches
 +</​code>​
 +
 +==== Results ====
 +
 +===== Kingston Datatraveler 8GB USB2 =====
 +
 +Block size and resulting transfer speeds are:
 +
 +<​code>​
 +default block size : 3.0 MB/s
 +512 : 3.9 MB/s
 +1024 : 3.8 MB/s
 +2048 : 4.2 MB/s
 +4096 : 12.3 MB/s
 +8192 : 14.5 MB/s
 +16384 : 14.5 MB/s
 +32768 : 15.4 MB/s
 +65536 : 16.9 MB/s
 +131072 : 17.0 MB/s
 +262144 : 16.9 MB/s
 +524288 : 17.0 MB/s
 +1048576 : 17.0 MB/s
 +2097152 : 15.7 MB/s
 +4194304 : 17.0 MB/s
 +8388608 : 17.0 MB/s
 +16777216 : 17.1 MB/s
 +33554432 : 17.0 MB/s
 +67108864 : 17.1 MB/s
 +</​code>​
 +
 +===== Kingston Datatraveler Elite G2 64GB USB3 =====
 +
 +Block size and resulting transfer speeds are:
 +
 +<​code>​
 +default block size : 5.9 MB/s
 +512 : 5.1 MB/s
 +1024 : 12.2 MB/s
 +2048 : 95.3 MB/s
 +4096 : 164 MB/s
 +8192 : 234 MB/s
 +16384 : 312 MB/s
 +32768 : 362 MB/s
 +65536 : 414 MB/s
 +131072 : 435 MB/s
 +262144 : 444 MB/s
 +524288 : 453 MB/s
 +1048576 : 456 MB/s
 +2097152 : 247 MB/s
 +4194304 : 18.7 MB/s
 +8388608 : 222 MB/s
 +16777216 : 122 MB/s
 +33554432 : 27.4 MB/s
 +67108864 : 237 MB/s
 +</​code>​
 +
 +==== Conclusions ====
 +
 +Block size can have a huge impact on the transfer speeds. But larger files may be needed for consistent results.
 +
 +Kingston Datatraveler Elite G2 does live up to the numbers and it can reach up to ten fold speeds of the USB2 older and smaller drive.
 +
 +==== Comments ====
 +
 +All comments and corrections are welcome.
 +
 +{(rater>​id=usb_transfer_rates|type=rate|trace=ip|tracedetails=0|headline=off)}
 +
 +~~DISCUSSION|Leave a comment~~
 +
 +~~QUICKSTATS:​usb_transfer_rates@&​basics~~
 + 
 +~~QUICKSTATS:​usb_transfer_rates&​ip~~~~NOCACHE~~
 +~~QUICKSTATS:​usb_transfer_rates&​basics~~
 +~~QUICKSTATS:​usb_transfer_rates&​ip~~

  //check if we are running within the DokuWiki environment if (!defined("DOKU_INC")){ die(); } //place the needed HTML source codes BELOW this line