I’m investigating high CPU usage on our Xavier NX 6-camera setup.
Running the 13_multi_camera sample from Libargus with the following patch uses ~60% CPU on each of the 6 CPUs.
NVP Model: 20W 6CORE
Jetson Clocks: Active
may I know how you obtain 60% usage results? could you please enable top utility and toggle the Irix mode off for checking.
besides, you should configure maximum performance mode (keep clock frequencies, instead of varying) to evaluate the CPU usage.
we’ve tested this before. it’s configured to $ sudo nvpmodel -m 0 and also $ sudo jetson_clocks
checking CPU usages by running $ ./argus_camera, it shows ~12% CPU usage for 6-cam use-case. (tested on AGX Xavier.)
you may try reduce the number of camera to see the CPU usage dropped.
I don’t have numbers since we don’t have 6-cam reference board for Xavier NX.
FYI,
it’s camera application and EGL streams consume CPU resources, mostly CPU usage was taken by argus_camera application due to buffer transmit.
besides, camera pipeline still need CPU to run lots of algorithms like AE, AWB, ToneMap…etc.
Use case: 6 CSI cameras → Libargus → ROS.
We are using Libargus to access the getSensorSofTimestampTsc function, for camera synchronisation.
Is there anyway to optimise the buffer transmit?
We’ve found that even after we disable any processing/rendering in our libargus application, the CPU usage is still around 60% according to jtop, htop and tegrastats.
number of online CPU core it matters, you should toggle Irix mode off to obtain average CPU usage.
and… since you’ve running argus_camera to obtain this results. it’s 22% CPU usage for your actual camera use-case.
may I know what’s the expectation of total CPU usage?
had you tried argus_camera to enable AeLock, AwbLock… etc for checking?
BTW, you may also refer to MMAPI sample, such as 13_multi_camera and modify the code to disable EGL streams.
I provided a patch in my original message (at the top) that comments out the EGL display related code from sample 13_multi_camera. Is that what you mean by disabling EGL streams?
ya, that’s looks the right approach to disable EGL streams.
there also a simple gst pipeline to do launch camera stream without display and only shows frame-rates. you may try this to evaluate the CPU usage.
for example, $ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=I420' ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 -v