question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Support]: CPU usage near 100% with version 0.11.0 beta 5

See original GitHub issue

Describe the problem you are having

After upgrading to version 0.11.0 beta 2, 4 & 5, my CPU usage is near 100% when normally it’s around 25-30%. I’ve tried rebooting the Frigate container as well as rebooting my entire mini server (Odyssey X86 Blue J4125) but the issue persists. I did not make any changes to my Frigate config file. Frigate itself appears to be running just fine.

Version

0.11.0-D2C3CDC

Frigate config file

mqtt:
  host: ip_address
  user: username
  password: password

cameras:
  front:
    ffmpeg:
      inputs:
        - path: rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
            - rtmp
        - path: rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=0
          roles:
            - record
    objects:
      track:
        - person
        - vehicle
        - animal
    record:
      events:
        required_zones:
          - sidewalk
          - driveway
    snapshots:
      required_zones:
        - sidewalk
        - driveway
    zones:
      sidewalk:
        coordinates: 0,741,1533,339,1359,286,921,350,0,561
      driveway:
        coordinates: 468,1080,1920,1080,1920,583,1785,519,1620,646,1121,484,304,701
    motion:
      mask:
        - 1510,354,1920,285,1920,0,1324,0
        - 0,1080,250,1080,147,675,0,703
  side:
    ffmpeg:
      inputs:
        - path: rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
            - rtmp
        - path: rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=0
          roles:
            - record
    objects:
      track:
        - person
        - animal
    motion:
      mask:
        - 244,0,254,285,435,273,430,79,1641,1080,1920,1080,1920,0
      improve_contrast: True
  back:
    ffmpeg:
      inputs:
        - path: rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
            - rtmp
        - path: rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=0
          roles:
            - record
    objects:
      track:
        - person
        - animal
    motion:
      mask:
        - 1357,48,1666,101,1920,201,1920,0,0,0,0,79
  inside:
    ffmpeg:
      inputs:
        - path: rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=2
          roles:
            - detect
            - rtmp
        - path: rtsp://username:password@ip_address:554/cam/realmonitor?channel=1&subtype=0
          roles:
            - record
    motion:
      mask:
        - 1920,0,1920,74,633,72,637,0

record:
  enabled: True
  retain:
    days: 6
    mode: all
  events:
    retain:
      default: 12
      mode: active_objects

detect:
  width: 1920
  height: 1080

model:
  labelmap:
    2: vehicle
    3: vehicle
    5: vehicle
    7: vehicle
    15: animal
    16: animal
    17: animal

ffmpeg:
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p
  output_args:
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy

detectors:
  coral:
    type: edgetpu
    device: pci

Relevant log output

From `top` showing the top 4 highest CPU usage (77.8, 76.5, 74.5, 73.5):  

   6016 root      20   0  602248  75744  26408 R  77.8   0.9   7:47.10 ffmpeg                                          
   5998 root      20   0  601188  73316  26052 R  76.5   0.9   7:48.00 ffmpeg                                          
   6013 root      20   0  601812  81136  26252 R  74.5   1.0   7:44.76 ffmpeg                                          
   6012 root      20   0  600808  72116  26372 R  73.5   0.9   7:47.56 ffmpeg

FFprobe output from your camera

ffprobe version 4.2.2 Copyright (c) 2007-2019 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, rtsp, from 'rtsp://username:password@ip_address:port/cam/realmonitor?channel=1&subtype=0':
  Metadata:
    title           : Media Server
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt470bg/bt470bg/bt709, progressive), 2688x1520, 15 fps, 15 tbr, 90k tbn, 30 tbc
    Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp

Frigate stats

No response

Operating system

Debian

Install method

Docker Compose

Coral version

M.2

Network connection

Wired

Camera make and model

Loryta (Dahua) IPC-T5442TM-AS

Any other information that may be helpful

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:130 (67 by maintainers)

github_iconTop GitHub Comments

2reactions
NickM-27commented, Jul 19, 2022

I would suggest waiting to close until the beta is officially out and that image is confirmed to have the same behavior (I’m sure it will, but just for completion sake)

2reactions
shred86commented, Jul 16, 2022

Using LIBVA_DRIVER_NAME_JELLYFIN=i965, I’m back to the CPU levels I saw in 0.10.0 of ~30% and I can see that hwaccel is working via intel_gpu_top. Additionally, the video playback from the Frigate web UI is no longer choppy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode 13 beta 5 - High CPU usage | Apple Developer Forums
I'm seeing 100%+ CPU usage for Xcode 13 beta 5 just by opening it and leaving it at the welcome screen. Running on...
Read more >
541230 – ksmd high CPU usage - Red Hat Bugzilla
Description of problem: Running two KVM virtual machines and ksmd takes lot of CPU. Version-Release number of selected component (if applicable): ...
Read more >
Fix 100% CPU Usage in Windows 11 - Easy Guide - YouTube
For more information, follow this guide:http://techy.how/tutorials/win11- 100 -cpu-usageA short tutorial on how to fix 100 % CPU utilization on ...
Read more >
Webpack npm - Vulnerabilities & Security Analysis - Snyk
Find out if webpack has security vulnerabilities that can threaten your software project, and which is the safest version of webpack to use....
Read more >
Previous PyTorch Versions
CUDA 10.2 conda install pytorch==1.10.0 torchvision==0.11.0 ... -c conda-forge # CPU Only # Pytorch LTS version 1.8.2 is only supported for Python <=...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found