Jetson nano EMMC module write speed is extremely slow with usb3.0 port

Hi,
I’m keeping the rootFS on an external USB3.1 storage.
but the write speed is extremely slow, The USB average speed of 200MB/s on laptop, but on the jetson nano it is around 10MB/s.
Here is the dmesg output:
dmesg | grep USB
[ 1.063061] tegra-xusb-padctl 7009f000.xusb_padctl: TEGRA_FUSE_USB_CALIB_EXT_0 = 0x4
[ 4.569032] ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
[ 4.580118] ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver
[ 4.598684] tegra-xusb 70090000.xusb: USB2 port 0 has OTG_CAP
[ 4.627278] tegra-xusb 70090000.xusb: new USB bus registered, assigned bus number 1
[ 4.628373] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.628379] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.638494] hub 1-0:1.0: USB hub found
[ 4.639084] tegra-xusb 70090000.xusb: new USB bus registered, assigned bus number 2
[ 4.639298] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[ 4.639304] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.639790] hub 2-0:1.0: USB hub found
[ 4.640565] tegra-xusb 70090000.xusb: Upgrade port 0 to USB3.0
[ 4.640570] tegra-xusb 70090000.xusb: Upgrade port 1 to USB3.0
[ 4.808789] tegra-xudc-new 700d0000.xudc: USB charger detection disabled
[ 4.966235] usb 1-2: new high-speed USB device number 2 using tegra-xusb
[ 4.991953] usb 1-2: New USB device found, idVendor=1a40, idProduct=0101
[ 5.021261] usb 1-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 5.028410] usb 1-2: Product: USB 2.0 Hub
[ 5.033547] hub 1-2:1.0: USB hub found
[ 5.555690] usb 2-1: new SuperSpeed USB device number 2 using tegra-xusb
[ 5.584703] usb 2-1: New USB device found, idVendor=13fe, idProduct=6700
[ 5.591417] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5.598555] usb 2-1: Product: USB DISK 3.0
[ 5.612793] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 6.060416] usbhid: USB HID core driver
[ 6.656812] scsi 0:0:0:0: Direct-Access USB DISK 3.0 PMAP PQ: 0 ANSI: 6

For what is below I will assume the disk as a whole shows as “/dev/sda”. If you don’t have the command “smartctl”, then you might need to “sudo apt-get install smartmontools”. What do you see from:

  • lsusb
  • lsusb -t
  • sudo smartctl -i /dev/sda
  • dmesg | egrep -i '(sata|usb)'

The answers are as below:
lsusb
Bus 002 Device 002: ID 0781:5583 SanDisk Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 5000M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/5p, 480M
|__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M

sudo smartctl -i /dev/sda
smartctl 6.6 2016-05-31 r4324 [aarch64-linux-4.9.201-tegra] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/sda: Unknown USB bridge [0x0781:0x5583 (0x100)]
Please specify device type with the -d option.

Use smartctl -h to get a usage summary

dmesg | egrep -i ‘(sata|usb)’
[ 0.000000] Kernel command line: tegraid=21.1.2.0.0 ddr_die=4096M@2048M section=512M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,4 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1075 core_edp_ma=4000 gpt earlycon=uart8250,mmio32,0x70006000 root=/dev/sda1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 sdhci_tegra.en_boot_part_access=1
[ 0.463142] iommu: Adding device 70090000.xusb to group 2
[ 0.535225] vdd-usb-vbus: supplied by vdd-5v0-sys
[ 0.535274] vdd-usb-vbus: 5000 mV
[ 0.535794] vdd-usb-vbus2: 5000 mV
[ 0.579192] usbcore: registered new interface driver usbfs
[ 0.579264] usbcore: registered new interface driver hub
[ 0.579354] usbcore: registered new device driver usb
[ 0.644551] vdd-usb-vbus2: supplied by vdd-3v3-sys
[ 0.646714] vdd-usb-hub-en: supplied by vdd-1v8-sys
[ 0.646771] vdd-usb-hub-en: 5000 mV
[ 1.057056] tegra-xusb-padctl 7009f000.xusb_padctl: TEGRA_FUSE_SKU_CALIB_0 = 0x9a49411
[ 1.057085] tegra-xusb-padctl 7009f000.xusb_padctl: TEGRA_FUSE_USB_CALIB_EXT_0 = 0x4
[ 1.058848] tegra-xusb-padctl 7009f000.xusb_padctl: dev = phy-usb2.0, lane = usb2-0, function = xusb
[ 1.058975] tegra-xusb-padctl 7009f000.xusb_padctl: dev = phy-usb2.1, lane = usb2-1, function = xusb
[ 1.059082] tegra-xusb-padctl 7009f000.xusb_padctl: dev = phy-usb2.2, lane = usb2-2, function = xusb
[ 1.059282] tegra-xusb-padctl 7009f000.xusb_padctl: dev = phy-pcie.3, lane = pcie-0, function = pcie-x1
[ 1.059388] tegra-xusb-padctl 7009f000.xusb_padctl: dev = phy-pcie.4, lane = pcie-1, function = pcie-x4
[ 1.059490] tegra-xusb-padctl 7009f000.xusb_padctl: dev = phy-pcie.5, lane = pcie-2, function = pcie-x4
[ 1.059594] tegra-xusb-padctl 7009f000.xusb_padctl: dev = phy-pcie.6, lane = pcie-3, function = pcie-x4
[ 1.059705] tegra-xusb-padctl 7009f000.xusb_padctl: dev = phy-pcie.7, lane = pcie-4, function = pcie-x4
[ 1.059809] tegra-xusb-padctl 7009f000.xusb_padctl: dev = phy-pcie.8, lane = pcie-5, function = xusb
[ 1.059911] tegra-xusb-padctl 7009f000.xusb_padctl: dev = phy-pcie.9, lane = pcie-6, function = xusb
[ 4.509821] usbcore: registered new interface driver r8152
[ 4.515359] usbcore: registered new interface driver asix
[ 4.520819] usbcore: registered new interface driver ax88179_178a
[ 4.526955] usbcore: registered new interface driver cdc_ether
[ 4.532828] usbcore: registered new interface driver net1080
[ 4.538539] usbcore: registered new interface driver cdc_subset
[ 4.544501] usbcore: registered new interface driver zaurus
[ 4.550132] usbcore: registered new interface driver cdc_ncm
[ 4.562352] ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
[ 4.573411] ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver
[ 4.591994] tegra-xusb 70090000.xusb: USB2 port 0 has OTG_CAP
[ 4.598368] tegra-xusb-padctl 7009f000.xusb_padctl: enabled OTG on UTMI pad 0
[ 4.606787] tegra-xusb 70090000.xusb: extcon 0: ffffffc0f90da000 id
[ 4.615344] usbcore: registered new interface driver uas
[ 4.620727] tegra-xusb 70090000.xusb: Firmware timestamp: 2019-10-17 15:58:59 UTC, Version: 50.25 release
[ 4.620771] tegra-xusb 70090000.xusb: xHCI Host Controller
[ 4.620799] tegra-xusb 70090000.xusb: new USB bus registered, assigned bus number 1
[ 4.621561] tegra-xusb 70090000.xusb: hcc params 0x0184f525 hci version 0x100 quirks 0x00050010
[ 4.621619] tegra-xusb 70090000.xusb: irq 61, io mem 0x70090000
[ 4.621907] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.621914] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.621918] usb usb1: Product: xHCI Host Controller
[ 4.621922] usb usb1: Manufacturer: Linux 4.9.201-tegra xhci-hcd
[ 4.621926] usb usb1: SerialNumber: 70090000.xusb
[ 4.622592] hub 1-0:1.0: USB hub found
[ 4.623185] tegra-xusb 70090000.xusb: xHCI Host Controller
[ 4.623197] tegra-xusb 70090000.xusb: new USB bus registered, assigned bus number 2
[ 4.623274] usb usb2: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 4.623375] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[ 4.623380] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.623384] usb usb2: Product: xHCI Host Controller
[ 4.623388] usb usb2: Manufacturer: Linux 4.9.201-tegra xhci-hcd
[ 4.623391] usb usb2: SerialNumber: 70090000.xusb
[ 4.623810] hub 2-0:1.0: USB hub found
[ 4.624576] tegra-xusb 70090000.xusb: Upgrade port 0 to USB3.0
[ 4.624581] tegra-xusb 70090000.xusb: Upgrade port 1 to USB3.0
[ 4.722372] tegra-xusb-padctl 7009f000.xusb_padctl: power on UTMI pads 1
[ 4.722626] usb usb2: usb_suspend_both: status 0
[ 4.778254] usbcore: registered new interface driver usb-storage
[ 4.784390] usbcore: registered new interface driver usbserial
[ 4.800862] tegra-xudc-new 700d0000.xudc: USB charger detection disabled
[ 4.815033] usbcore: registered new interface driver xpad
[ 4.950242] usb 1-2: new high-speed USB device number 2 using tegra-xusb
[ 4.977938] usb 1-2: New USB device found, idVendor=1a40, idProduct=0101
[ 5.010771] usb 1-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 5.017910] usb 1-2: Product: USB 2.0 Hub
[ 5.023762] hub 1-2:1.0: USB hub found
[ 5.154246] tegra-xusb-padctl 7009f000.xusb_padctl: power down UTMI pad 1
[ 5.178237] usb 1-2: usb_suspend_both: status 0
[ 5.182877] usb usb1: usb_suspend_both: status 0
[ 5.735011] usb 2-1: new SuperSpeed USB device number 2 using tegra-xusb
[ 5.758163] usb 2-1: New USB device found, idVendor=0781, idProduct=5583
[ 5.758169] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5.758173] usb 2-1: Product: SanDisk 3.2Gen1
[ 5.758177] usb 2-1: Manufacturer: USB
[ 5.758181] usb 2-1: SerialNumber: 0101e712fdf32c2537c0b32eaa221dc51ae1cf3cdfa66c411b3f7e0714fe0180dd9e000000000000000000003057955500925400835581078dac078c
[ 5.759447] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 5.759735] scsi host0: usb-storage 2-1:1.0
[ 6.092305] usbcore: registered new interface driver usbhid
[ 6.097891] usbhid: USB HID core driver
[ 6.135673] usbcore: registered new interface driver snd-usb-audio
[ 6.787422] scsi 0:0:0:0: Direct-Access USB SanDisk 3.2Gen1 1.00 PQ: 0 ANSI: 6
[ 11.153050] usb0: HOST MAC c6:15:54:0c:54:3e
[ 11.153078] usb0: MAC c6:15:54:0c:54:3f
[ 11.168635] l4tbr0: port 2(usb0) entered blocking state
[ 11.168640] l4tbr0: port 2(usb0) entered disabled state
[ 11.168943] device usb0 entered promiscuous mode
[ 38.018395] vdd-usb-vbus: disabling
[ 38.018397] vdd-usb-vbus2: disabling
[ 38.018543] vdd-usb-hub-en: disabling

Note that if you use the “pencil” icon you can edit your post. I recommend you edit, highlight the dmesg log, and click on the “code” icon (looks like </>). This will cause it to preserve formatting and add scrollbars to that part of the post.

Looks like the USB side is running at USB 3 speeds (the USB controller is the USB 3 root_hub). This is not to say that something else isn’t a bottleneck, but I don’t think the USB itself is the issue:

/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 5000M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M

This makes me wonder about the specific hardware:

sudo smartctl -i /dev/sda
...
/dev/sda: Unknown USB bridge [0x0781:0x5583 (0x100)]

We know this is USB storage, but can you give more details about the exact type of storage behind the USB? E.g., is this an ordinary SATA hard drive, SSD, SD card, so on? I suppose it is possible for USB to make it problematic for smartctl to query the device, but this seems unlikely. It is apparently SanDisk, which would usually be an SD card, and would also explain a lack of smartctl working with it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.