[Config Support]: High CPU Load #20089
-
Describe the problem you are havingI ad installed Frigate on my docker for a year already. At the beginning I bought a Coral TPU und had experienced high CPU load due to ffmpeg. I still experience CPU loads wich I will not tolerate, of about 60-70% with all (5) cameras. When I reduce the cameras to a minimal config of 2, I get 30-40% load. Here is a graphical overview, after starting frigate: The processes in question are
I already tried to start anew with a clean config and only one camera, but even with one camera and also a reduced detect-solution, the CPU load rose considerably. Version0.16.1-e664cb2 Frigate config file# yaml-language-server: $schema=http://192.168.2.179:5000/api/config/schema
detectors:
coral:
type: edgetpu
device: usb
# num_threads: 2
ffmpeg:
#hwaccel_args: preset-nvidia-h264
hwaccel_args: preset-nvidia-h264
mqtt:
host: 192.168.1.110
user: user
password: password
#Include all cameras by default in Birdseye view
birdseye:
enabled: False
audio:
# Optional: Enable audio events (default: shown below)
enabled: False
go2rtc:
streams:
haustuer:
- ffmpeg:rtsp://user:[email protected]:554/live
haustuer_sub:
- ffmpeg:rtsp://user:[email protected]:554/cam/realmonitor?channel=1&subtype=1
#garage:
# - ffmpeg:rtsp://user:[email protected]:554/live
#garage_sub:
# - ffmpeg:rtsp://user:[email protected]:554/cam/realmonitor?channel=1&subtype=1
terasse:
- ffmpeg:rtsp://user:[email protected]:554/live
terasse_sub:
- ffmpeg:rtsp://user:[email protected]:554/cam/realmonitor?channel=1&subtype=1
#westfassade:
# - ffmpeg:rtsp://user:[email protected]:554/live
#westfassade_sub:
# - ffmpeg:rtsp://user:[email protected]:554/cam/realmonitor?channel=1&subtype=1
#schuppen:
# - ffmpeg:rtsp://user:[email protected]:554/live
#schuppen_sub:
# - ffmpeg:rtsp://user:[email protected]:554/cam/realmonitor?channel=1&subtype=1
cameras:
Haustuer:
ffmpeg:
hwaccel_args: preset-nvidia-h264
inputs:
- path: rtsp://127.0.0.1:8554/haustuer
roles:
- record
- path: rtsp://127.0.0.1:8554/haustuer_sub
roles:
- detect
detect:
width: 1920
height: 1080
fps: 5
enabled: true
zones:
strasse:
coordinates: 687,226,865,56,1032,40,1207,124,1343,21,936,0,0,333,0,781
vorgarten:
coordinates: 363,1080,1755,1028,1623,53,1248,65,1034,241,656,266,257,487
Strasse:
coordinates: 0.172,0.406,0.074,0.282,0.301,0.117,0.384,0.213
loitering_time: 0
speed_threshold: 10
distances: 5,9,5,8
objects:
- bicycle
- bus
- car
- cat
- dog
- horse
- person
objects:
filters:
car: {}
snapshots:
required_zones: [strasse, vorgarten]
record:
enabled: true
alerts:
retain:
days: 10
# mode: all
detections:
retain:
days: 1
review:
alerts:
required_zones: strasse
motion:
mask:
- 0.39,0.392,0.418,0.11,0.524,0.013,0.684,0.012,0.689,0.296
- 0.237,0.812,0.076,0.312,0.003,0.318,0.005,0.839,0.155,0.985
Terasse:
ffmpeg:
hwaccel_args: preset-nvidia
inputs:
- path: rtsp://127.0.0.1:8554/terasse
roles:
- record
- path: rtsp://127.0.0.1:8554/terasse_sub
roles:
- detect
detect:
width: 704 # <---- update for your camera's resolution
height: 576 # <---- update for your camera's resolution
fps: 5
enabled: true
zones:
Pflaster:
coordinates:
0.161,0.265,0.279,0.196,0.263,0.089,0.389,0.003,0.439,0.023,0.408,0.12,0.927,0.651,0.812,0.994,0.308,0.99
#loitering_time: 0
Rasen:
coordinates:
0.923,0.629,0.997,0.338,0.982,0.097,0.839,0.006,0.445,0.008,0.417,0.115
# loitering_time: 0
motion:
mask: 0.788,0.043,0.98,0.302,0.983,0.04
record:
retain:
# Optional: Number of days to retain recordings regardless of events (default: shown below)
# NOTE: This should be set to 0 and retention should be defined in events section below
# if you only want to retain recordings of events.
days: 2
# Optional: Event recording settings
alerts:
retain:
days: 5
mode: motion
pre_capture: 5
post_capture: 8
detections:
retain:
days: 5
mode: motion
pre_capture: 5
post_capture: 5
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: true
# Optional: save a clean PNG copy of the snapshot image (default: shown below)
clean_copy: true
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: false
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: true
# Optional: crop the snapshot (default: shown below)
crop: false
# Optional: height to resize the snapshot to (default: original size)
#height: 175
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
# required_zones: [strasse]
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
car: 2
person: 15
detect:
stationary:
interval: 5
threshold: 50
enabled: true
objects:
track:
- person
- bicycle
- car
- motorcycle
- bus
- bird
- cat
- dog
- horse
- frisbee
- sports ball
- kite
- skateboard
- bottle
- cell phone
timestamp_style:
format: '%Y-%m-%d %H:%M:%S'
# environment_vars:
# PLUS_API_KEY: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
version: 0.16-0
camera_groups:
Vorne-Hinten:
order: 1
icon: LuAlignCenter
cameras:
- Haustuer
- Terasse
semantic_search:
enabled: false
model_size: small
face_recognition:
enabled: False
model_size: small
lpr:
enabled: False
classification:
bird:
enabled: falseRelevant Frigate log output2025-09-16 10:20:09.998945583 [INFO] Preparing Frigate...
2025-09-16 10:20:10.586117960 [INFO] Starting Frigate...
2025-09-16 10:20:15.168475822 [2025-09-16 10:20:15] frigate.util.config INFO : Checking if frigate config needs migration...
2025-09-16 10:20:15.211279048 [2025-09-16 10:20:15] frigate.util.config INFO : frigate config does not need migration...
2025-09-16 10:20:15.352544648 [2025-09-16 10:20:15] frigate.app INFO : Starting Frigate (0.16.1-e664cb2)
2025-09-16 10:20:15.480142992 [2025-09-16 10:20:15] peewee_migrate.logs INFO : Starting migrations
2025-09-16 10:20:15.480608965 [2025-09-16 10:20:15] peewee_migrate.logs INFO : There is nothing to migrate
2025-09-16 10:20:15.854252363 [2025-09-16 10:20:15] frigate.app INFO : Recording process started: 388
2025-09-16 10:20:15.854932048 [2025-09-16 10:20:15] frigate.app INFO : Review process started: 390
2025-09-16 10:20:15.858904820 [2025-09-16 10:20:15] frigate.app INFO : go2rtc process pid: 127
2025-09-16 10:20:15.872584238 [2025-09-16 10:20:15] detector.coral INFO : Starting detection process: 413
2025-09-16 10:20:15.873157328 [2025-09-16 10:20:15] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2025-09-16 10:20:15.883208137 [2025-09-16 10:20:15] frigate.app INFO : Output process started: 431
2025-09-16 10:20:17.035062897 [2025-09-16 10:20:17] frigate.app INFO : Camera processor started for Haustuer: 458
2025-09-16 10:20:17.042070884 [2025-09-16 10:20:17] frigate.app INFO : Camera processor started for Terasse: 460
2025-09-16 10:20:17.053615608 [2025-09-16 10:20:17] frigate.app INFO : Capture process started for Haustuer: 467
2025-09-16 10:20:17.080489778 [2025-09-16 10:20:17] frigate.app INFO : Capture process started for Terasse: 487
2025-09-16 10:20:17.250711068 [2025-09-16 10:20:17] frigate.api.fastapi_app INFO : Starting FastAPI app
2025-09-16 10:20:17.443561536 [2025-09-16 10:20:17] frigate.api.fastapi_app INFO : FastAPI started
2025-09-16 10:20:18.530505712 [2025-09-16 10:20:18] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2025-09-16 10:20:18.543524689 INFO: Created TensorFlow Lite XNNPACK delegate for CPU.Relevant go2rtc log output2025-09-16 10:20:10.586472194 [INFO] Preparing new go2rtc config...
2025-09-16 10:20:11.028596935 [INFO] Starting go2rtc...
2025-09-16 10:20:11.134661066 10:20:11.134 INF go2rtc platform=linux/amd64 revision=fa580c5 version=1.9.9
2025-09-16 10:20:11.134666111 10:20:11.134 INF config path=/dev/shm/go2rtc.yaml
2025-09-16 10:20:11.135073507 10:20:11.135 INF [api] listen addr=:1984
2025-09-16 10:20:11.135131441 10:20:11.135 INF [rtsp] listen addr=:8554
2025-09-16 10:20:11.135450027 10:20:11.135 INF [webrtc] listen addr=:8555
2025-09-16 10:20:19.732057538 [INFO] Starting go2rtc healthcheck service...Frigate statsNo response Operating systemDebian Install methodDocker Compose docker-compose file or Docker CLI commandservices:
Frigate:
container_name: Frigate
image: ghcr.io/blakeblackshear/frigate:stable
cap_add:
- CAP_PERFMON
privileged: true # this may not be necessary for all setups
shm_size: "370mb" # update for your cameras based on calculation above
devices:
- /dev/bus/usb:/dev/bus/usb
# - /dev/dri:/dev/dri
# GPU Integration
deploy:
resources:
reservations:
devices:
- driver: nvidia
#device_ids: ['0'] # this is only needed when using multiple GPUs
count: 1 # number of GPUs
capabilities: [gpu]
runtime: nvidia
environment:
- PLUS_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hostname: "4340d6d45b9f"
ipc: "private"
logging:
driver: "json-file"
options: {}
mac_address: "02:42:ac:11:00:09"
network_mode: "bridge"
ports:
- 1935:1935/tcp
- 5000:5000/tcp
restart: "unless-stopped"
volumes:
- /srv/dev-disk-by-uuid-9ec9b5a8-c948-4286-b43a-995fb00d8aec/Multimedia/CONFIG/frigate/config:/config
- /srv/dev-disk-by-uuid-9ec9b5a8-c948-4286-b43a-995fb00d8aec/Multimedia/CONFIG/frigate/media:/media/frigate
- /etc/localtime:/etc/localtime:ro
- /usr/lib/x86_64-linux-gnu/libedgetpu.so.1:/usr/lib/x86_64-linux-gnu/libedgetpu.so.1
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
working_dir: "/opt/frigate"Object DetectorCoral Screenshots of the Frigate UI's System metrics pagesAny other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
You should tune your motion detection: https://docs.frigate.video/configuration/motion_detection |
Beta Was this translation helpful? Give feedback.





You should tune your motion detection: https://docs.frigate.video/configuration/motion_detection