High CPU usage with GPU encoding. #18432
sergiobaiao
started this conversation in
General
Replies: 3 comments 25 replies
-
as an added note, i've already tried the tensorrt image and had the same behaviour, even after reindexing. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Your config has a handful of issues with it.
|
Beta Was this translation helpful? Give feedback.
4 replies
-
This is how my System Metrics page looks: See the difference between the CPU and GPU usage? |
Beta Was this translation helpful? Give feedback.
20 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there everyone. I'm setting up frigate to use my gpu for encoding/decoding ffmpeg (i have a tpu for inference). This is my working config.yml as of now:
config.yaml.txt
and my docker-compose.yml:
docker-compose.yml.txt
running nvidia-smi from the host:
servidorcoral:~$ nvidia-smi
Tue May 27 18:50:56 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.153.02 Driver Version: 570.153.02 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3050 Off | 00000000:04:00.0 On | N/A |
| 37% 47C P0 25W / 70W | 3650MiB / 6144MiB | 6% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 2272774 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 232MiB |
| 0 N/A N/A 2272785 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 220MiB |
| 0 N/A N/A 2272796 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 216MiB |
| 0 N/A N/A 2272807 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 228MiB |
| 0 N/A N/A 2272818 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 228MiB |
| 0 N/A N/A 2272829 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 216MiB |
| 0 N/A N/A 2272851 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 224MiB |
| 0 N/A N/A 2272906 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 220MiB |
| 0 N/A N/A 2274155 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 97MiB |
| 0 N/A N/A 2274163 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 101MiB |
| 0 N/A N/A 2274183 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 101MiB |
| 0 N/A N/A 2274187 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 101MiB |
| 0 N/A N/A 2274191 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 101MiB |
| 0 N/A N/A 2274196 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 101MiB |
| 0 N/A N/A 2274200 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 101MiB |
| 0 N/A N/A 2274204 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 97MiB |
| 0 N/A N/A 2274212 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 101MiB |
| 0 N/A N/A 2274232 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 99MiB |
| 0 N/A N/A 2274236 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 101MiB |
| 0 N/A N/A 2274241 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 99MiB |
| 0 N/A N/A 2274245 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 101MiB |
| 0 N/A N/A 2274250 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 101MiB |
| 0 N/A N/A 2274254 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 101MiB |
| 0 N/A N/A 2274258 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 101MiB |
| 0 N/A N/A 2274281 C /usr/lib/ffmpeg/7.0/bin/ffmpeg 101MiB |
+-----------------------------------------------------------------------------------------+
and from the container:
servidorcoral:~$ docker exec -it frigate nvidia-smi
Tue May 27 18:51:29 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.153.02 Driver Version: 570.153.02 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3050 Off | 00000000:04:00.0 On | N/A |
| 37% 48C P0 27W / 70W | 3927MiB / 6144MiB | 10% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
+-----------------------------------------------------------------------------------------+
Even with everything apparently correctly configured, this is how my htop looks like:

Does anyone have an idea on how to fix this?
Beta Was this translation helpful? Give feedback.
All reactions