Jetson Xavier USB speed

We are using two USB3Vision cameras on a single Jetson Xavier NX and have trouble understanding the performance behaviour of the Jetson at this point.

The cameras are individually able to a sustained transfer rate of 380 MBytes/s (tested individually on the same Jetson Xavier). As soon as we drive both cameras at once, the combined transfer maxes out at around 432 MBytes/s, which is a far fetch from the advertised 10 GBit/s USB root-hub performance. Are there any flags we need to set ?

Thanks for your help,

Martin

The NX does not come with a carrier board, and the firmware/PINMUX may change how USB ports behave. The first thing you might want to do is verify the port is actually running in USB3.1 gen. 2 mode. When both cameras are attached, what do you see from “lsusb -t”?

This is the output from lsusb -t

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
    |__ Port 3: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
        |__ Port 1: Dev 22, If 0, Class=Miscellaneous Device, Driver=, 5000M
        |__ Port 1: Dev 22, If 1, Class=Miscellaneous Device, Driver=, 5000M
        |__ Port 1: Dev 22, If 2, Class=Miscellaneous Device, Driver=, 5000M
        |__ Port 3: Dev 21, If 2, Class=Miscellaneous Device, Driver=, 5000M
        |__ Port 3: Dev 21, If 0, Class=Miscellaneous Device, Driver=, 5000M
        |__ Port 3: Dev 21, If 1, Class=Miscellaneous Device, Driver=, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 3: Dev 3, If 0, Class=Wireless, Driver=rtk_btusb, 12M
    |__ Port 3: Dev 3, If 1, Class=Wireless, Driver=rtk_btusb, 12M

I made sure that both cameras are connecting to bus #2 (they are dev 21 and dev 22).

Also: we tested the same cameras on a standard Linux machine (x86_64) with a 10 GBit/s root usb hub and the cameras delivered full framerate at a combined 780 MBytes/s using the same wiring.

For comparison, the excerpt of lsusb -t on the x86_64 machine:

/:  Bus 08.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    |__ Port 2: Dev 4, If 2, Class=Miscellaneous Device, Driver=, 5000M
    |__ Port 2: Dev 4, If 0, Class=Miscellaneous Device, Driver=, 5000M
    |__ Port 2: Dev 4, If 1, Class=Miscellaneous Device, Driver=, 5000M
    |__ Port 3: Dev 5, If 0, Class=Miscellaneous Device, Driver=, 5000M
    |__ Port 3: Dev 5, If 1, Class=Miscellaneous Device, Driver=, 5000M
    |__ Port 3: Dev 5, If 2, Class=Miscellaneous Device, Driver=, 5000M

System info for the Jetson:
Jetson Xavier NX dev board running L4T kernel 4.9.201-tegra-32.5.1-20210219084708.
/sys/module/usbcore/parameters/usbfs_memory_mb set to 1000

All the best,

Martin

Hi,
Does your camera USB3 gen1 or gen2? If it is gen1, the maximum bandwidth is 5Gbps.

For multiple USB cameras you also need to consider current limitation. Please check
https://developer.nvidia.com/jetson-xavier-nx-developer-kit-carrier-board-specification-p3509-a01

2.1 USB Ports
The carrier board supports two USB Connectors. One is a USB 2.0 Micro B connector (J5) supporting Device mode only (including USB Recovery). There are two, dual stacked USB 3.0 Type A connectors (J6 and J7). Each connector supports Host mode only. A single load switch supplies VBUS to all four USB 3.0 ports and is limited to 2A of output current.

Hi,

Thanks for your reply. The cameras are gen1 and the 5GBit/s bandwidth per camera is expected. However, I did not expect that when I attach both cameras, that the overall bandwidth of the root-hub will be limited to 5 GBit/s.

I connected one camera to J6 and the other one to J7. The cameras should not pull more than 2A, but might be close (I measured around 800mA per camera when they are operating).

It is clear that the used ports on J6 and J7 themselves are limited to 5 GBit/s, but I expect that when I connect two cameras to two different ports of the root-hub, that I get (close to) 5 GBit/s per port (which is true for the Linux PC that I cross-tested on) and not for all ports combined. Can you confirm that the total bandwidth available on all ports will be limited to 5 GBit/s once a gen1 device is connected ?

Yes, all the gen1 cameras are sharing the same 5Gbps bandwidth.

1 Like

Thanks a lot for the clarification. Out of curiosity: if I would connect a set of gen2 cameras, the usable bandwidth would be higher (cameras sharing a 10 GBit/s connection) ?

Just to verify, the port is indeed running at USB3 gen. 2, but the devices are running at USB3 gen. 1. Looks like the devices cannot run at gen. 2 speeds, but just two such devices would consume the complete bandwidth (and I see 6 such devices, so there is no possibility that port can actually run at gen. 1 speed on all devices simultaneously.

Keep in mind that if your camera could use gen. 2 speeds, then you could have only one such device on that root HUB port. The root HUB is the sum total limitation.

NOTE: 5000M at the end of the line is 5000Mbit/s (less with overhead), and is gen. 1. 10000M is double that speed, and is gen. 2.