Performance
Fregata is shaped to do as little work on the CPU as possible. The ideal idle profile on a 4–6 camera install:
- CPU: 5–15 % across all cores. Most of it is ffmpeg parsing RTSP and nginx serving the web UI.
- GPU: ~0 %. Detection runs on the ANE, not the GPU.
- ANE: barely visible in
powermetricsbecause individual inferences are 1–4 ms. - Memory: 1–3 GB resident.
If your numbers are noticeably off that, this page is the right place to start.
Where to look first
Section titled “Where to look first”The web UI’s System tab has live charts for:
- Detector inference time — the per-frame ms for each detector. Should plateau in the 1–4 ms range on the ANE.
- Camera FPS — actual decoded FPS per camera, separate for the detection sub-stream and the recording main stream.
- Process CPU — broken out by sub-process (
frigate.app, per-camera ffmpeg, nginx, go2rtc).
For deeper data, set FREGATA_PERF_LOGS=1 in Settings →
Environment Variables and restart Frigate. The Python core will
emit per-pipeline timing logs at WARNING level. Don’t leave this on
in normal operation — it’s verbose enough to bury real warnings.
”My CPU is at 100 %”
Section titled “”My CPU is at 100 %””Three causes account for almost every report:
1. Too high a detection FPS
Section titled “1. Too high a detection FPS”The most common cause. If you’ve configured detect.fps: 15 and
your camera is capturing at 30 fps, ffmpeg has to keep decoding
both streams. Use a separate sub-stream for detection:
cameras: driveway: ffmpeg: inputs: - path: rtsp://.../h264Preview_01_main roles: [record] - path: rtsp://.../h264Preview_01_sub roles: [detect] detect: fps: 5 width: 640 height: 4805 fps for detection is plenty for outdoor cameras. The main stream keeps recording at full FPS for playback.
2. Software decode
Section titled “2. Software decode”If your camera’s RTSP isn’t H.264 or HEVC (e.g. MJPEG), VideoToolbox can’t accelerate the decode. ffmpeg falls back to software, and the CPU pays. The fix is usually one of:
- Switch the camera’s stream to H.264 in its own settings.
- Run the camera through go2rtc with a transcode step (Frigate’s
go2rtcconfig block can do this).
3. Detector fell off the ANE
Section titled “3. Detector fell off the ANE”If Detector inference time is 50+ ms, you’re on CPU. Restart and
check the warmup log; common culprits are an unsupported op in a
custom model or inference_backend: cpu left over from debugging.
Recordings encoder
Section titled “Recordings encoder”Fregata’s default ffmpeg presets on macOS:
- Decode (every input):
-hwaccel videotoolbox - Recording encode (default):
h264_videotoolbox -allow_sw 1 - Re-stream (RTSP, for go2rtc):
h264_videotoolbox -allow_sw 1
The -allow_sw 1 flag means the encoder will fall back to software
if VideoToolbox can’t service the request. On healthy hardware that
fall-back never fires, but it’s a reasonable safety net.
If you’d rather record HEVC for ~30 % smaller files, set:
ffmpeg: output_args: record: preset-record-generic-audio-copy…and override the record preset to use hevc_videotoolbox. Most
users don’t bother; the bandwidth saving on a single Mac with local
storage isn’t usually worth the slightly slower scrubbing.
RAM-disk cache
Section titled “RAM-disk cache”Fregata uses a small RAM-disk under ~/Fregata/temp/ for
high-frequency intermediate files (detection frames, preview
snapshots, IPC). The size is computed from your camera config — a
4-camera 1080p install ends up around 256–512 MB.
You can override this:
- Tray → Settings → Environment Variables → set
FRIGATE_CACHE_SIZE_MB=1024(or whatever) and restart. - Set the cache size to
0(the default) to let the launcher pick.
The RAM-disk is unmounted on quit. You don’t need to manage it manually.
Thermals on laptops
Section titled “Thermals on laptops”Fregata is unusually thermal-friendly because the ANE and the media engine run cool. Even on a fanless MacBook Air, a 4-camera install won’t push the chassis past warm.
That said, ffmpeg parsing many simultaneous RTSP streams on Wi-Fi will spin fans. The cure is wired Ethernet between the cameras and the Mac, not a config change.
Perf checklist
Section titled “Perf checklist”When something feels slow, work top-to-bottom:
- Inference tier — ANE (1–4 ms) ✅, GPU (5–15 ms) ⚠️, CPU (40+ ms) ❌. Restart Fregata if you fell off the ANE.
- Detection FPS vs camera FPS — match
detect.fpsto a sane number, use a sub-stream. - Decode acceleration — verify the input codec is H.264 or
HEVC.
mediainfoor ffprobe will tell you. - Disk write speed —
iostat -d 5 5while recording. If write latency is >50 ms, the disk is the bottleneck. - Network jitter —
mtrfrom the Mac to each camera. Anything above 5 ms on a LAN is a sign of bad Wi-Fi. - Process count — open Activity Monitor, group by process name. Ten ffmpeg processes for ten cameras is fine; thirty for ten cameras means you’re decoding more streams than you should.
If you want a hand reading the output, see Troubleshooting or open a discussion on GitHub with the perf logs attached.