USB 3.0 Performance on i.MX 8M

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 3.0 Performance on i.MX 8M

282 Views
xoduddk123
Contributor I

Hi, NXP Support Team.

I have an i.MX 8MQ development board.
I bought a USB 3.0 external hard case and NVMe M.2 SSD to test the USB 3.0 speed.
USB 3.0 External Hard Case: RevuAhn UX980
NVMe M.2 SSD: Samsung 970 EVO Plus M.2 NVMe SSD 250GB

The speed of the purchased external hard drive was checked from the USB 3.1(USB 3.2 Gen 2) port on the desktop.
NVMe.png

I did a speed test of the USB 3.0 external hard drive on the i.MX 8M development board with the dd command.
But the speed came out lower than I expected. Since it is USB 3.0, I expected a speed close to 500 MB/s.

root@imx8mqevk:~# uname -a
Linux imx8mqevk 5.4.70 #49 SMP PREEMPT Tue Oct 26 15:28:23 KST 2021 aarch64 aarch64 aarch64 GNU/Linux
root@imx8mqevk:~#
root@imx8mqevk:~#
[ 80.213250] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[ 80.246101] scsi host0: uas
[ 80.249722] scsi 0:0:0:0: Direct-Access RevuAhn UX980 0208 PQ: 0 ANSI: 6
[ 82.232773] sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/233 GiB)
[ 82.240303] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 82.246092] sd 0:0:0:0: [sda] Write Protect is off
[ 82.251552] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 82.261282] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
[ 82.296370] sda: sda1
[ 82.300315] sd 0:0:0:0: [sda] Attached SCSI disk
[ 82.598946] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
root@imx8mqevk:~#
root@imx8mqevk:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 5.5G 3.4G 1.8G 66% /
devtmpfs 994M 4.0K 994M 1% /dev
tmpfs 1.5G 0 1.5G 0% /dev/shm
tmpfs 1.5G 9.0M 1.5G 1% /run
tmpfs 1.5G 0 1.5G 0% /sys/fs/cgroup
tmpfs 1.5G 4.0K 1.5G 1% /tmp
tmpfs 1.5G 188K 1.5G 1% /var/volatile
/dev/mmcblk0p1 84M 30M 54M 36% /run/media/mmcblk0p1
/dev/mmcblk0p2 5.5G 3.9G 1.4G 75% /run/media/mmcblk0p2
/dev/mmcblk1p1 84M 30M 54M 36% /run/media/mmcblk1p1
tmpfs 296M 8.0K 296M 1% /run/user/0
/dev/sda1 230G 4.1G 214G 2% /run/media/sda1
root@imx8mqevk:~#
root@imx8mqevk:~# mount
/dev/mmcblk1p2 on / type ext4 (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=1017540k,nr_inodes=254385,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /var/volatile type tmpfs (rw,relatime)
/dev/mmcblk0p1 on /run/media/mmcblk0p1 type vfat (rw,relatime,gid=6,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mmcblk0p2 on /run/media/mmcblk0p2 type ext4 (rw,relatime)
/dev/mmcblk1p1 on /run/media/mmcblk1p1 type vfat (rw,relatime,gid=6,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=302092k,mode=700)
/dev/sda1 on /run/media/sda1 type ext4 (rw,relatime)
root@imx8mqevk:~#
root@imx8mqevk:~# echo 3 > /proc/sys/vm/drop_caches
[ 182.039954] sh (632): drop_caches: 3
root@imx8mqevk:~#
root@imx8mqevk:~# sync ; dd if=/dev/zero of=/run/media/sda1/largefile bs=1G count=4 oflag=direct ; sync
4+0 records in
4+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 12.2417 s, 351 MB/s
root@imx8mqevk:~#
root@imx8mqevk:~# sync ; dd if=/run/media/sda1/largefile of=/dev/null bs=1G count=4 ; sync
4+0 records in
4+0 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 11.7799 s, 365 MB/s
root@imx8mqevk:~# hdparm /dev/sda1
-sh: hdparm: command not found


I saw an article called [USB 3.0 performance on iMX8M] on the NXP Community.
In this article, the theoretical speed of USB 3.0 is 500 MB/s, but in iMX8M it is described as 150-170 MB/s.
But the speeds I currently tested are 350-360 MB/s.

 

Is the maximum speed of USB 3.0 350-360 MB/s on the current i.MX 8M?
Can I get more speed of USB 3.0 on i.MX 8M with professional service?
BSP of i.MX 8M is using version 5.4.70_2.3.2.

Regards,
Kwon

Labels (1)
0 Kudos
0 Replies