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: 4-8 % 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
powermetricsormacmonbecause individual inferences are 1–2 ms. - Memory: 1–2 GB resident, several minutes after startup.
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–2 ms range on an M4 ANE.
- Camera FPS — actual decoded FPS per camera.
- Process CPU — broken out by sub-process (per-camera ffmpeg, nginx, go2rtc).
”My CPU is at 100 %“
Section titled “”My CPU is at 100 %“”1. Detector fell off the ANE
Section titled “1. Detector fell off the ANE”If Detector inference time is 50+ ms, you’re on CPU. Restart and
check the warmup log; common culprit is an unsupported op in a
custom model.
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. Detection FPS is too high
Section titled “3. Detection FPS is too high”A surprisingly common source of unnecessary CPU is detect.fps
left at the camera’s native rate (often 25 or 30 FPS). Inference
runs at this rate per camera — independent of the recording
stream, which always captures at the camera’s native FPS for
playback.
Don’t set detect.fps above 10. Even though the ANE has the
headroom, going higher offers no detection-accuracy benefit
(detections are per-frame, not per-second), and it trips
Frigate’s own config validator, which logs "Recommended value is 5" on every camera with detect.fps > 10. The work is real
ANE cycles and heat for no actual improvement.
5 FPS is plenty for most scenes; 10 FPS makes sense if you have fast-moving objects such as cars racing down a busy street. Pick the lowest value that catches what you need.
cameras: driveway: detect: fps: 10For deeper guidance on detect.fps and on detect.width /
detect.height (matching detection to your camera’s main-stream
resolution — Fregata runs detection on the full stream by
default, no sub-stream needed), see
Detection tuning → Detection resolution and FPS.
If detect.fps is already sensible and CPU is still pegged on
older hardware, then consider a separate low-resolution
sub-stream for detection — the rare case where the two-input
pattern is actually useful on Fregata. See
Cameras — Sub-streams: optional power saver.
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.
RAM-disk cache
Section titled “RAM-disk cache”Fregata buffers high-frequency intermediate files (detection frames, preview snapshots, IPC sockets, the nginx and go2rtc caches) in a RAM-backed volume rather than hammering the SSD. There are two backings, and you pick one in the welcome wizard’s “Memory for recordings” step on first launch:
| Option in the wizard | Backing |
|---|---|
| Smart memory · recommended | tmpfs (sparse, demand-paged) |
| Basic RAM disk | HFS+ disk image (pre-allocated, wired) |
The default (if you haven’t completed the wizard yet) is
Smart memory. Whichever mode is in effect is logged at
startup — look for Cache backing: … in the Frigate log.
If you picked Smart memory but the privileged helper isn’t approved or fails to mount at runtime, Fregata transparently falls back to the Basic RAM disk for that session.
Smart memory (tmpfs — sparse, demand-paged)
Section titled “Smart memory (tmpfs — sparse, demand-paged)”A tmpfs RAM filesystem with a sparse 1 GB cap that only charges memory for the bytes actually written. A largely-idle 4-camera install will sit at well under 100 MB; even a busy install will never need more than 1 GB in a healthy state.
The mount lives at a deliberately-hidden path under
~/Library/Caches/com.3rdbitlabs.fregata/temp so that Finder
and Spotlight don’t surface it. The menu-bar tray’s
Settings → Folders → Open Cache Folder item is disabled
while Smart memory is active, for the reason in the next
callout.
Basic RAM disk (HFS+ disk image — pre-allocated, wired)
Section titled “Basic RAM disk (HFS+ disk image — pre-allocated, wired)”An HFS+ disk image attached via hdiutil, mounted at
~/Fregata/temp. Unlike Smart memory, this backing
pre-allocates its entire size as wired RAM the moment it
mounts, whether or not anything’s written to it — that’s
the trade-off in exchange for not needing a privileged helper.
To keep wired-memory cost reasonable, Fregata computes the size from your camera config — a 4-camera 1080p install ends up around 256 MB.
You can override the size:
- Tray → Settings → Environment Variables → set
FRIGATE_CACHE_SIZE_MB=1024(or whatever) and restart. Sets the ceiling for the auto-sized formula (1024 MB is the hard upper bound regardless). - Leave it unset (the default) to let the launcher pick.
This setting does NOT apply to Smart memory — that mode’s 1 GB sparse cap is fixed.
Both backings unmount automatically when Fregata quits. You don’t need to manage either one 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 6-camera install won’t push the chassis past warm.
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) ❌.
- 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.
- Detection FPS vs camera FPS — match
detect.fpsto a sane number (5 is plenty for most outdoor cameras). Add a sub-stream only if that’s not enough.
If you want a hand reading the output, see Troubleshooting or open a discussion on GitHub with the perf logs attached.