Nvargus-daemon cpu usage

This forum post mentions that when running 6 cameras at 1 megapixel at 60 Hz, it is expected behavior that the nvargus-daemon will use 3 out of the 6 cores on the Xavier NX. What is happening inside the navargus-daemon that is using this amount of CPU?

Also, this forum post mentions that the source code for nvargus-daemon is available, but I couldn’t find it in the public_sources link provided in the answer. Do you know where it is?

hello jfk214,

may I know what’s your approach to evaluate CPU usage, are you using tegrastats then average the CPU usage? if you’re using top utility, please do remember to switch-off irix mode (i.e. shift+i) to get average CPU usage.

number of cameras and also camera frame rate that influences CPU utilization.
there’re some CPU usage for the camera use-case, 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 3A.

please access Jetson Linux | NVIDIA Developer page and download the [L4T Driver Package (BSP) Sources], you may also download MMAPI via APT server,
for example, $ sudo apt install nvidia-l4t-jetson-multimedia-api.

Hi Jerry, thanks for the quick reply. I’ll keep disabling irix mode in mind. I’m assuming the cpu usage numbers in the post I linked had it enabled since the percentages are over 100. I also have some follow up questions regarding your answer.

  1. Since you mentioned the EGL streams, I also found this post which mentions that using IBufferOutputStream instead of IFrameConsumer will avoid copying to the EGL stream. Would you expect doing this to save a significant amount of cpu?
    IFrameConsumer vs IBufferOutputStream - #7 by ShaneCCC

  2. Does 3A algorithms refer to auto-focus, auto-exposure, and auto-whitebalance? If so would you also expect disabling them to save a significant amount of cpu? I think I can disable them with the Argus::IAutoControlSettings. Are there any other algorithms besides 3A that I could disable?

  3. I downloaded the BSP sources you linked but couldn’t find the nvargus-daemon source code. Do you know the filename and path where it is located?

hello jfk214,

Q1
it should be, you may have quick try to compare the CPU usage by disable the camera preview frames rendering.
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

Q2
yes, 3A means auto-focus, auto-exposure, auto-white balance… such camera controls. you may try enable camera stream with argus_camera application, there’s user-interface for you toggle the AE lock, please try enable AE lock and you shall see slightly CPU usage drop.

Q3
sorry, we don’t public the sources code of /usr/sbin/nvargus-daemon.
you may download MMAPI via APT server, $ sudo apt install nvidia-l4t-jetson-multimedia-api to get the sources of argus_camera application.

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