USB 3.0 performance on iMX8M

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB 3.0 performance on iMX8M

5,854 Views
jeromebolduc
Contributor III

Hello,

We just received the iMX8M EVK using the NXP image v4.9.88 and we have some issues with the USB 3.0 bandwidth. When using a UVC camera in order to capture video using the following pipeline, we do not achieve the frame rate.

>> gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,framerate=60/1 ! fpsdisplaysink text-overlay=false sync=false -v

We are getting about 20-25 fps.

However, when we remove the rendering onscreen using the following pipeline:

>> gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,framerate=60/1 ! fpsdisplaysink video-sink="fakesink sync=false" text-overlay=false sync=false -v

We are getting 37 fps. This pipeline only challenges the USB 3.0 port.

Do you know why we are getting this limitation? Is the USB 3.0 port should be able to handle 1080p60 YUY2, i.e. 250 MB/s?

 

I remember we were using a iMX6 board with a USB 3.0 to PCIe bridge (Renesas chipset) and we were getting similar results. We were wondering if the iMX8 had increased the xhci performance. Looking at our results, it is not the case.

Thanks,

Jérôme

Labels (1)
6 Replies

4,612 Views
jeromebolduc
Contributor III

Hi bharatkumarbacha,

I got response from NXP Technical Support Services that said it was a USB / xHCI performance issue. The best we can do with USB 3.0 right now is 150-170 MB/s on all iMX6 & iMX8 platforms. They proposed to request their Professional Services in order to optimize USB 3.0 throughput.

I suppose there is some kind of xHCI driver issue since we seem to have the same performance using other ARM platforms. I even used a Rockchip RK3399 and iMX6, they showed the same performance. Maybe DMA accesses and xHCI driver optimizations would solve this bottleneck on this platform.

Regarding queue using gstreamer, there is no improvement.

Regards.

Jérôme 

4,596 Views
AmosBatto
Contributor I

Does anyone know if this has been improved? Is USB 3.0 on the iMX8M still limited to 150 - 170 MB/s?

0 Kudos

4,612 Views
bharatkumarbach
Contributor III

Hi jerome bolduc,

Did you get any better in achieving higher speeds in USB 3.0?

0 Kudos

4,612 Views
b36401
NXP Employee
NXP Employee

USB 3.0 bandwidth is 625 MB/s.
However real throughput is application dependent and may be less than 625.
Also please note that processor may be loaned with video enconing and may not reach expected FPS.

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

4,612 Views
jeromebolduc
Contributor III

I am very far from the "real throughput" of USB 3.0 = 625 MB/s - 20% protocol overhead = 500 MB/s

I am getting about 150 MB/s, i.e. 1920 x 1080 x 2 bytes/pixel x 37 frames/s = 153.45MB/s

I am using a gstreamer pipeline command, which is quite optimized.

In addition, there is no encoding/decoding using the provided pipelines, we get raw 1920x1080p60 at YUY2, which is uncompressed video.

Do you have the same behavior on your side?

Do you know any devices connected to iMX8 that really challenges USB 3.0 speed?

Thanks for your help on getting back to me,

Jérôme

4,612 Views
b36401
NXP Employee
NXP Employee

Have you tried using buffering and queue Gstreamer element as Yuri wrote?
Here is a document regarding to GStreamer usage:

https://community.nxp.com/docs/DOC-93688

0 Kudos