[FrontPage] [TitleIndex] [WordIndex

Simple USB Write Speed Testing

(Based on a suggestion by HawaiianPi in this forum thread)

undercon.png


"Reference" Case: V7 USB2 Flash Disk in a P3A+

lsusb & usb-devices extracts

Bus 001 Device 002: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=090c ProdID=1000 Rev=11.00
S:  Manufacturer=General
S:  Product=USB Flash Disk
S:  SerialNumber=04IPA7HIVRVVCRV4
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=300mA
I:  If#=0x0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

Speed Test

pi@raspiP3Aplus1:/media/pi/38D6-E887 $ dd if=/dev/zero of=test.data bs=4M count=1000 status=progress
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 640 s, 6.6 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 650.875 s, 6.4 MB/s
pi@raspiP3Aplus1:/media/pi/38D6-E887 $ ls -laF
total 4133780
drwxr-xr-x  5 pi   pi        16384 Jul 16 18:43 ./
drwxr-x---+ 3 root root       4096 Jul 16 18:39 ../
-rw-r--r--  1 pi   pi         5289 Oct 19  2016 logo.png
drwxr-xr-x  7 pi   pi        16384 Sep 16  2019 moin-1.9.8/
-rw-r--r--  1 pi   pi     37140821 Jul  6  2015 moin-1.9.8.tar.gz
drwxr-xr-x  4 pi   pi        49152 Sep 13  2019 MoinMoinExport/
drwxr-xr-x  2 pi   pi        16384 Feb  1  2017 oldmoinconfig/
-rw-r--r--  1 pi   pi        95678 Oct 19  2016 RaspiAplus.JPG
-rw-r--r--  1 pi   pi       183495 Oct 19  2016 RaspiBlack.png
-rw-r--r--  1 pi   pi       208754 Oct 19  2016 RaspiBlue.png
-rw-r--r--  1 pi   pi        52219 Oct 19  2016 RaspiBplus1.JPG
-rw-r--r--  1 pi   pi        46797 Oct 19  2016 RaspiBplus2.JPG
-rw-r--r--  1 pi   pi       292674 Oct 19  2016 RaspiGrey.png
-rw-r--r--  1 pi   pi         3622 Oct 19  2016 raspiidx.htm
-rw-r--r--  1 pi   pi        62825 Oct 19  2016 RaspiP2B.JPG
-rw-r--r--  1 pi   pi        59802 Oct 19  2016 RaspiP3B.JPG
-rw-r--r--  1 pi   pi        46717 Mar 19  2018 RaspiP3Bplus18.JPG
-rw-r--r--  1 pi   pi        48708 Oct 19  2016 RaspiPiZero1v3.JPG
-rw-r--r--  1 pi   pi        37915 Oct 19  2016 RaspiPiZero.JPG
-rw-r--r--  1 pi   pi       209929 Oct 19  2016 RaspiRed.png
-rw-r--r--  1 pi   pi   4194304000 Jul 16 18:54 test.data

Case 1: Same V7 USB2 Flash Disk in a P4B USB2 Port

lsusb & usb-devices extracts

Bus 001 Device 007: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  7 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=090c ProdID=1000 Rev=11.00
S:  Manufacturer=General
S:  Product=USB Flash Disk
S:  SerialNumber=04IPA7HIVRVVCRV4
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=300mA
I:  If#=0x0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

Speed Test

pi@raspiP4B4b-32GbP:/media/pi/38D6-E887 $ dd if=/dev/zero of=test.data bs=4M count=1000 status=progress
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 980 s, 4.3 MB/s 
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 991.679 s, 4.2 MB/s
pi@raspiP4B4b-32GbP:/media/pi/38D6-E887 $ ls -laF
total 4133780
drwxr-xr-x  5 pi   pi        16384 Jul 16 19:09 ./
drwxr-x---+ 4 root root       4096 Jul 16 19:08 ../
-rw-r--r--  1 pi   pi         5289 Oct 19  2016 logo.png
drwxr-xr-x  7 pi   pi        16384 Sep 16  2019 moin-1.9.8/
-rw-r--r--  1 pi   pi     37140821 Jul  6  2015 moin-1.9.8.tar.gz
drwxr-xr-x  4 pi   pi        49152 Sep 13  2019 MoinMoinExport/
drwxr-xr-x  2 pi   pi        16384 Feb  1  2017 oldmoinconfig/
-rw-r--r--  1 pi   pi        95678 Oct 19  2016 RaspiAplus.JPG
-rw-r--r--  1 pi   pi       183495 Oct 19  2016 RaspiBlack.png
-rw-r--r--  1 pi   pi       208754 Oct 19  2016 RaspiBlue.png
-rw-r--r--  1 pi   pi        52219 Oct 19  2016 RaspiBplus1.JPG
-rw-r--r--  1 pi   pi        46797 Oct 19  2016 RaspiBplus2.JPG
-rw-r--r--  1 pi   pi       292674 Oct 19  2016 RaspiGrey.png
-rw-r--r--  1 pi   pi         3622 Oct 19  2016 raspiidx.htm
-rw-r--r--  1 pi   pi        62825 Oct 19  2016 RaspiP2B.JPG
-rw-r--r--  1 pi   pi        59802 Oct 19  2016 RaspiP3B.JPG
-rw-r--r--  1 pi   pi        46717 Mar 19  2018 RaspiP3Bplus18.JPG
-rw-r--r--  1 pi   pi        48708 Oct 19  2016 RaspiPiZero1v3.JPG
-rw-r--r--  1 pi   pi        37915 Oct 19  2016 RaspiPiZero.JPG
-rw-r--r--  1 pi   pi       209929 Oct 19  2016 RaspiRed.png
-rw-r--r--  1 pi   pi   4194304000 Jul 16 19:26 test.data

Case 2 Kingston USB3 Flash Drive in a P4B USB 3 Port

(More detailed info. here)

pi@raspiP4B4b-32GbP:/media/pi/KINGSTON/TestArea $ dd if=/dev/zero of=test.data bs=4M count=1000 status=progress
4185915392 bytes (4.2 GB, 3.9 GiB) copied, 214 s, 19.6 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 224.019 s, 18.7 MB/s
pi@raspiP4B4b-32GbP:/media/pi/KINGSTON/TestArea $ ls -laF
total 4096032
drwxr-xr-x  2 pi pi      16384 Jul 16 20:29 ./
drwxr-xr-x 12 pi pi      16384 Jul 16 20:28 ../
-rw-r--r--  1 pi pi 4194304000 Jul 16 20:33 test.data

Case 3 A Second, Larger, Kingston USB3 Flash Drive in the same P4B USB 3 Port

lsusb & usb-devices extracts

Bus 002 Device 004: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=5000 MxCh= 0
D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
P:  Vendor=0951 ProdID=1666 Rev=01.10
S:  Manufacturer=Kingston
S:  Product=DataTraveler 3.0
S:  SerialNumber=E0D55EA5741CB3A1F9350071
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=504mA
I:  If#=0x0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

Speed Test

pi@raspiP4B4b-32GbP:/media/pi/DTG4V64GB/TestArea $ dd if=/dev/zero of=test.data bs=4M count=1000 status=progress
4164943872 bytes (4.2 GB, 3.9 GiB) copied, 148 s, 28.1 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 149.674 s, 28.0 MB/s
pi@raspiP4B4b-32GbP:/media/pi/DTG4V64GB/TestArea $ ls -laF
total 4096064
drwxr-xr-x 2 pi pi      32768 Jul 16 20:50 ./
drwxr-xr-x 8 pi pi      32768 Jul 16 20:50 ../
-rw-r--r-- 1 pi pi 4194304000 Jul 16 20:53 test.data

Case 4 USB2 Seagate Expansion Drive in a P4B USB 2 Port

lsusb & usb-devices extracts

Bus 001 Device 009: ID 0bc2:2300 Seagate RSS LLC Expansion Portable

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  9 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0bc2 ProdID=2300 Rev=01.30
S:  Manufacturer=Seagate 
S:  Product=Portable        
S:  SerialNumber=2GH1Z9DL    
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:  If#=0x0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

Speed Test

pi@raspiP4B4b-32GbP:/media/pi/Expansion Drive/TestArea $ dd if=/dev/zero of=test.data bs=4M count=1000 status=progress
4164943872 bytes (4.2 GB, 3.9 GiB) copied, 131 s, 31.8 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 131.95 s, 31.8 MB/s
pi@raspiP4B4b-32GbP:/media/pi/Expansion Drive/TestArea $ ls -laF
total 4096008
drwxrwxrwx 1 pi pi        152 Jul 16 21:26 ./
drwxrwxrwx 1 pi pi       8192 Jul 16 21:26 ../
-rwxrwxrwx 1 pi pi 4194304000 Jul 16 21:28 test.data*

Case 5 Larger, USB3 Seagate Expansion Drive in a P4B USB 3 Port

(More detailed info. here)

pi@raspiP4B4b-32GbP:/media/pi/Seagate Expansion Drive/TestArea $ dd if=/dev/zero of=test.data bs=4M count=1000 status=progress
4177526784 bytes (4.2 GB, 3.9 GiB) copied, 133 s, 31.4 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 133.678 s, 31.4 MB/s
pi@raspiP4B4b-32GbP:/media/pi/Seagate Expansion Drive/TestArea $ ls -laF
total 4096008
drwxrwxrwx 1 pi pi        152 Jul 16 21:13 ./
drwxrwxrwx 1 pi pi       8192 Jul 16 21:13 ../
-rwxrwxrwx 1 pi pi 4194304000 Jul 16 21:16 test.data*

Case 6 USB3-to-SATA Adapter and attached SSD in a P4B USB 3 Port

(More detailed info. here)

pi@raspiP4B4b-32GbP:/media/pi/SPA55128GB/TestArea $ dd if=/dev/zero of=test.data bs=4M count=1000 status=progress
4181721088 bytes (4.2 GB, 3.9 GiB) copied, 28 s, 149 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 28.2798 s, 148 MB/s
pi@raspiP4B4b-32GbP:/media/pi/SPA55128GB/TestArea $ ls -laF
total 4096064
drwxr-xr-x  2 pi pi      32768 Jul 16 20:40 ./
drwxr-xr-x 10 pi pi      32768 Jul 16 20:40 ../
-rw-r--r--  1 pi pi 4194304000 Jul 16 20:41 test.data

Direct cf. USB uSDHC card writing speeds

(Verbatim uSDHC card "AO" shown here used throughout)

Reference test#1: Raspberry Pi Diagnostics results

pi@raspiP4B4d-32GbV:~ $ cat rpdiags.txt
Raspberry Pi Diagnostics - version 0.3
Wed Apr 29 21:24:11 2020

Test : SD Card Speed Test
Run 1
prepare-file;0;0;15941;31
seq-write;0;0;18118;35
rand-4k-write;0;0;4470;1117
rand-4k-read;13943;3485;0;0
Sequential write speed 18118 KB/sec (target 10000) - PASS
Random write speed 1117 IOPS (target 500) - PASS
Random read speed 3485 IOPS (target 1500) - PASS
Test PASS

Reference test#2 "Simple Test" Results

pi@raspiP4B4d-32GbV:~ $ mkdir TestArea
pi@raspiP4B4d-32GbV:~ $ cd TestArea/
pi@raspiP4B4d-32GbV:~/TestArea $ dd if=/dev/zero of=test.data bs=4M count=1000 status=progress
4152360960 bytes (4.2 GB, 3.9 GiB) copied, 224 s, 18.5 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 224.852 s, 18.7 MB/s
pi@raspiP4B4d-32GbV:~/TestArea $ ls -laF
total 4096012
drwxr-xr-x  2 pi pi       4096 Jul 17 13:25 ./
drwxr-xr-x 22 pi pi       4096 Jul 17 13:24 ../
-rw-r--r--  1 pi pi 4194304000 Jul 17 13:28 test.data

Case 1 USB2 Integral uSDHC Card Reader/Writer

(Example "R" shown here)

pi@raspiP4B4b-32GbP:~ $ cd /media/pi/rootfs/home/pi/TestArea/
pi@raspiP4B4b-32GbP:/media/pi/rootfs/home/pi/TestArea $ sudo mkdir TestArea2
pi@raspiP4B4b-32GbP:/media/pi/rootfs/home/pi/TestArea $ cd TestArea2/
pi@raspiP4B4b-32GbP:/media/pi/rootfs/home/pi/TestArea/TestArea2 $ ls -laF
total 8
drwxr-xr-x 2 root root 4096 Jul 17 13:44 ./
drwxr-xr-x 3 pi   pi   4096 Jul 17 13:44 ../
pi@raspiP4B4b-32GbP:/media/pi/rootfs/home/pi/TestArea/TestArea2 $ sudo dd if=/dev/zero of=test.data bs=4M count=1000 status=progress
4185915392 bytes (4.2 GB, 3.9 GiB) copied, 375 s, 11.2 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 375.72 s, 11.2 MB/s
pi@raspiP4B4b-32GbP:/media/pi/rootfs/home/pi/TestArea/TestArea2 $ ls -laF
total 4096012
drwxr-xr-x 2 root root       4096 Jul 17 13:47 ./
drwxr-xr-x 3 pi   pi         4096 Jul 17 13:44 ../
-rw-r--r-- 1 root root 4194304000 Jul 17 13:53 test.data

Case 2 USB3 Integral uSDHC Card Reader/Writer

(More info. here)

pi@raspiP4B4b-32GbP:~ $ cd /media/pi/rootfs/home/pi/TestArea/
pi@raspiP4B4b-32GbP:/media/pi/rootfs/home/pi/TestArea $ sudo mkdir TestArea3
pi@raspiP4B4b-32GbP:/media/pi/rootfs/home/pi/TestArea $ cd TestArea3
pi@raspiP4B4b-32GbP:/media/pi/rootfs/home/pi/TestArea/TestArea3 $ sudo dd if=/dev/zero of=test.data bs=4M count=1000 status=progress
4185915392 bytes (4.2 GB, 3.9 GiB) copied, 183 s, 22.9 MB/s
1000+0 records in
1000+0 records out
4194304000 bytes (4.2 GB, 3.9 GiB) copied, 183.548 s, 22.9 MB/s
pi@raspiP4B4b-32GbP:/media/pi/rootfs/home/pi/TestArea/TestArea3 $ ls -laF
total 4096012
drwxr-xr-x 2 root root       4096 Jul 17 13:57 ./
drwxr-xr-x 4 pi   pi         4096 Jul 17 13:57 ../
-rw-r--r-- 1 root root 4194304000 Jul 17 14:00 test.data



2023-01-19 22:07