[HW Accel Support]: Heavy CPU usage after upgrade from 13.2 to 14.0 beta #12614
-
Describe the problem you are havingMy cpu usage has spiked from an average of 12 to over 30 with spikes to 75 % (when detection kicks in). What if anything changed and any recommendations on how to improve cpu usage? I'm running on a Qnap with TS-664 Intel Celeron N5105 / N5095 quad-core processor. Version0.14.0 Beta Frigate config filemqtt:
host: 192.168.5.150
port: 1883
user: frigate
password:
ffmpeg:
hwaccel_args: preset-vaapi
birdseye:
enabled: true
width: 3840
height: 2160
quality: 10
mode: continuous
cameras:
front_yard:
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1
roles:
- detect
- path: rtsp://admin:[email protected]:554/
roles:
- record
garage_door:
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1
roles:
- detect
- path: rtsp://admin:[email protected]:554/
roles:
- record
back_patio:
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]:554/
roles:
- record
side_yard:
ffmpeg:
inputs:
- path: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1
roles:
- detect
- path: rtsp://admin:[email protected]:554/
roles:
- record
record:
enabled: true
retain:
days: 13
mode: all
objects:
track:
- person
detectors:
coral:
type: edgetpu
device: pci:0
detect:
width: 704
height: 480
fps: 15
snapshots:
enabled: true
timestamp: false
bounding_box: true
retain:
default: 10
version: 0.14 docker-compose file or Docker CLI commandservices:
frigate:
image: ghcr.io/blakeblackshear/frigate:0.14.0-beta4
container_name: frigate
restart: unless-stopped
privileged: true
shm_size: "512mb"
environment:
- FRIGATE_MQTT_HOST=192.168.5.150
- FRIGATE_MQTT_PORT=1883
- FRIGATE_MQTT_USER=frigate
- FRIGATE_MQTT_PASSWORD=password
- FRIGATE_FFMPEG_HWACCEL_ARGS="-hwaccel vaapi -hwaccel_device /dev/dri/renderD128"
- LIBVA_DRIVER_NAME=iHD
volumes:
- /share/CACHEDEV3_DATA/frigate/config:/config
- /dev:/dev
- /etc/localtime:/etc/localtime
- /share/CACHEDEV3_DATA/frigate:/media
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 1000000000 # 1GB of memory
devices:
- /dev/bus/pci:/dev/bus/pci
- /dev/dri:/dev/dri
- /dev/dri/renderD128:/dev/dri/renderD128
ports:
- "5000:5000"
- "1935:1935" Relevant log output2024-07-25 14:14:12.163300418 [INFO] Preparing Frigate...
2024-07-25 14:14:12.196188029 [INFO] Starting Frigate...
2024-07-25 14:14:15.391962406 [2024-07-25 14:14:15] frigate.app INFO : Starting Frigate (0.14.0-a4eb435)
2024-07-25 14:14:15.392165137 [2024-07-25 14:14:15] frigate.util.config INFO : Checking if frigate config needs migration...
2024-07-25 14:14:15.420883127 [2024-07-25 14:14:15] frigate.util.config INFO : frigate config does not need migration...
2024-07-25 14:14:22.596914666 [2024-07-25 14:14:22] peewee_migrate.logs INFO : Starting migrations
2024-07-25 14:14:22.597917523 [2024-07-25 14:14:22] peewee_migrate.logs INFO : There is nothing to migrate
2024-07-25 14:14:22.871734253 [2024-07-25 14:14:22] frigate.app INFO : Recording process started: 361
2024-07-25 14:14:22.878432061 [2024-07-25 14:14:22] frigate.app INFO : Recording process started: 367
2024-07-25 14:14:22.881013789 [2024-07-25 14:14:22] frigate.app INFO : go2rtc process pid: 110
2024-07-25 14:14:22.920351695 [2024-07-25 14:14:22] frigate.app INFO : Output process started: 392
2024-07-25 14:14:22.938780993 [2024-07-25 14:14:22] detector.coral INFO : Starting detection process: 390
2024-07-25 14:14:22.943403972 [2024-07-25 14:14:22] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as pci:0
2024-07-25 14:14:22.943408722 [2024-07-25 14:14:22] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2024-07-25 14:14:23.436219101 [2024-07-25 14:14:23] frigate.app INFO : Camera processor started for front_yard: 448
2024-07-25 14:14:23.443136483 [2024-07-25 14:14:23] frigate.app INFO : Camera processor started for garage_door: 454
2024-07-25 14:14:23.449402746 [2024-07-25 14:14:23] frigate.app INFO : Camera processor started for back_patio: 459
2024-07-25 14:14:23.455047307 [2024-07-25 14:14:23] frigate.app INFO : Camera processor started for side_yard: 465
2024-07-25 14:14:23.460902106 [2024-07-25 14:14:23] frigate.app INFO : Capture process started for front_yard: 468
2024-07-25 14:14:23.466684306 [2024-07-25 14:14:23] frigate.app INFO : Capture process started for garage_door: 472
2024-07-25 14:14:23.472598055 [2024-07-25 14:14:23] frigate.app INFO : Capture process started for back_patio: 474
2024-07-25 14:14:23.479517586 [2024-07-25 14:14:23] frigate.app INFO : Capture process started for side_yard: 479 FFprobe output from your cameradon't have it installed right now. Operating systemOther Linux Install methodDocker Compose Network connectionWired Camera make and modelDahua Starlight 8MP 4K Outdoor PoE IP Security Dome Camera IPC-HDBW2831R-ZAS-S2 Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
Would be good to see screenshots of the system and cameras metrics pages also,
under detectors is doing nothing, I would suggest removing it |
Beta Was this translation helpful? Give feedback.
-
Thanks Nick, something changed between 13.2 and 14.0 beta 4. Is there a different hardware acceleration type I should try? Tried setting LIBVA_DRIVER_NAME=i965 in my docker...frigate came up but camera feeds were dead. guessing driver compatibility issue with camera type? |
Beta Was this translation helpful? Give feedback.
-
Your |
Beta Was this translation helpful? Give feedback.
-
Nice catch, ty. I had been leaving the detect portion out for that camera because I didn't require or want it and turning it off at the camera setting wasn't sticking. will reconfigure and see if that helps. |
Beta Was this translation helpful? Give feedback.
update: think the back patio detect setting was causing the issue. I'm still seeing a few spikes into the 20's but it's holding pretty steady at 12 %.
thanks again hawkeye (excellent name choice)!