# Profiling CPU/GPU Usage in ROS 2 Camera Node on Jetson

**URL:** <https://forums.developer.nvidia.com/t/profiling-cpu-gpu-usage-in-ros-2-camera-node-on-jetson/335626>\
**Category:** Jetson AGX Orin\
**Tags:** ros-2-humble, gstreamer, camera, cuda\
**Created:** [June 9, 2025, 8:56am UTC](https://forums.developer.nvidia.com/t/profiling-cpu-gpu-usage-in-ros-2-camera-node-on-jetson/335626 "2025-06-09T08:56:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![irena.br](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@irena.br](https://forums.developer.nvidia.com/u/irena.br)\
**Post date:** [June 9, 2025, 8:56am UTC](https://forums.developer.nvidia.com/t/profiling-cpu-gpu-usage-in-ros-2-camera-node-on-jetson/335626/1 "2025-06-09T08:56:34Z")

</div>

I’m posting on behalf of a ROS 2 development effort targeting **Jetson AGX Orin (MILBOARD-AGX)**, using **GStreamer** for real-time camera processing.

We’re building a `camera_publisher` node with multiple `appsink` branches (raw, dewarped, compressed), and we’re running into significant **CPU overhead** as well as **pipeline configuration issues** that prevent full GPU acceleration.  
Our current pipline:  
pipeline \<\< "nvv4l2camerasrc device=/dev/video0 ! "  
\<\< "nvvideoconvert ! "  
\<\< "video/x-raw(memory:NVMM),format=RGBA,width=1920,height=1080 ! "  
\<\< “nvdewarper config-file=” \<\< device\_rectified\_path\_ \<\< " ! "  
\<\< "nvvideoconvert ! video/x-raw(memory:NVMM),format=NV12 ! "  
\<\< "nvvidconv ! video/x-raw,format=BGRx ! "  
\<\< "videoconvert ! video/x-raw,format=BGR ! "  
\<\< "tee name=t ";  
// RAW branch  
pipeline \<\< "t. ! queue ! videoconvert ! video/x-raw,format=BGR ! appsink name=raw\_sink emit-signals=false sync=false ";  
// Dewarped branch  
pipeline \<\< "t. ! queue ! videoconvert ! video/x-raw,format=BGR ! appsink name=dewarped\_sink emit-signals=false sync=false ";  
// Compressed branch  
pipeline \<\< "t. ! queue ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=ultrafast ! "  
\<\< "video/x-h264,profile=baseline ! appsink name=compressed\_sink emit-signals=false sync=false ";  
Frames are retrieved using `gst_app_sink_try_pull_sample()` and published via `cv_bridge`.

#### **High CPU Usage**

We observe CPU usage exceeding **170%** , even with NVMM and hardware encoders.

How do we **profile performance** on Jetson to identify what’s consuming so much CPU in our pipeline? Any recommended tools (TegraStats, nvprof, Nsight)?

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [June 9, 2025, 1:34pm UTC](https://forums.developer.nvidia.com/t/profiling-cpu-gpu-usage-in-ros-2-camera-node-on-jetson/335626/2 "2025-06-09T13:34:19Z")

</div>

Hello,

Thanks for visiting the NVIDIA Developer forums.

Your topic will be best served in the Jetson category, I have moved this post for better visibility.

Cheers,  
Tom

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [June 10, 2025, 12:28am UTC](https://forums.developer.nvidia.com/t/profiling-cpu-gpu-usage-in-ros-2-camera-node-on-jetson/335626/5 "2025-06-10T00:28:05Z")

</div>

Hi,  
Please run _sudo tegrastats_. It shows status of each hardware engines such as CPU, GPU, NVENC.

It ix expected to have significant CPU usage in the pipeline since NVMM buffers are converted and copied to CPU buffers. `RAW` and `Dewarped` branches need the conversion to send CPU buffers in BGR to _appsink_. For `Compressed` branch, you can use hardware encoder and send NVMM buffer to _nvv4l2h264enc_ directly like:

```auto
... ! nvvideoconvert ! video/x-raw(memory:NVMM),format=NV12 ! nvv4l2h264enc ! h264parse ! appsink 

```

---

<div class="post-metadata">

**Author:** ![irena.br](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@irena.br](https://forums.developer.nvidia.com/u/irena.br)\
**Post date:** [June 10, 2025, 5:34am UTC](https://forums.developer.nvidia.com/t/profiling-cpu-gpu-usage-in-ros-2-camera-node-on-jetson/335626/6 "2025-06-10T05:34:48Z")

</div>

Is there a way to is NVBufSurface to minimize CPU usage?

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [July 16, 2025, 3:05am UTC](https://forums.developer.nvidia.com/t/profiling-cpu-gpu-usage-in-ros-2-camera-node-on-jetson/335626/8 "2025-07-16T03:05:59Z")

</div>

Closed on July 16, 2025, 3:05am UTC

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