Let’s be honest: building a robust Frigate NVR system, especially when you’re scaling up to multiple 4K cameras, often feels like navigating a minefield. You’ve invested in powerful hardware, the latest cameras, and spent hours tweaking your Frigate configuration, only to be met with frustrating dropped frames, database corruption errors, or worse, a dead SSD just months into operation. You’re not alone. The promise of seamless, intelligent surveillance often collides head-on with the brutal realities of continuous, high-volume data writes, and the storage layer is almost always the first point of failure.
The core issue isn’t just about having “enough” space; it’s about having the right kind of space, architected correctly for Frigate’s unique and demanding I/O patterns. A single 4K camera stream can generate 8-12 Mbps of raw video data, and when you multiply that by ten cameras, you’re looking at a continuous write load of 80-120 Mbps, or roughly 10-15 MB/s, 24/7. This isn’t your typical home server workload. Consumer-grade SSDs, particularly QLC drives, are simply not designed for this kind of relentless, sustained write activity. Their low write endurance (TBW) ratings mean they’ll burn out prematurely, leaving you with lost footage and a hefty replacement bill. And while traditional HDDs offer capacity, they often struggle with the mixed I/O of database operations and event snapshots, leading to latency and potential dropped frames during critical moments. It’s a costly trap many fall into, sacrificing reliability for what seems like a good deal on paper.
For multi-camera Frigate NVR (0.14+), a robust 3-tier storage architecture is non-negotiable: an in-memory tmpfs RAM disk for raw segment buffering, a high-endurance NVMe SSD for database and event snapshots, and dedicated surveillance-grade HDDs for continuous 24/7 long-term recording. This layered approach eliminates bottlenecks, prevents premature drive failure, and ensures zero dropped frames.
Why Your Current Frigate Storage Is Probably Failing You (And What 80% Get Wrong)
Most people, when setting up Frigate, think about storage in a very linear way: “I need X terabytes, so I’ll buy a drive with X terabytes.” This simplistic view is the root of most problems. Frigate’s storage demands are anything but linear; they’re a complex dance of continuous sequential writes, rapid random writes for database updates, and bursty reads for event playback. Understanding this nuance is critical.
The biggest misconception is treating all storage media as interchangeable. A consumer QLC (Quad-Level Cell) SSD, while fast for typical desktop use, is a ticking time bomb under Frigate’s constant write load. QLC drives achieve high capacities at low cost by storing four bits per cell, which significantly reduces their write endurance (TBW – Total Bytes Written) compared to TLC (Triple-Level Cell) or MLC (Multi-Level Cell) drives. When Frigate is constantly writing 5-second video segments, these small, continuous writes trigger massive write amplification on QLC drives, rapidly consuming their limited TBW budget. You might see a drive rated for 300 TBW, but with write amplification, that could be exhausted in months, not years, especially with multiple 4K streams.
Then there’s the “just use a NAS” crowd. While a NAS offers centralized storage and redundancy, it introduces network latency. Frigate’s database (frigate.db) is a SQLite database, and it’s incredibly sensitive to I/O latency. Placing this database on a network share (NFS or SMB) over anything less than a dedicated 2.5GbE or 10GbE link, or even with a fast link but high latency, can lead to database locking errors, performance degradation, and ultimately, dropped frames or even Frigate crashes. The network overhead, even on fast links, adds a layer of complexity and potential failure points that are best avoided for the most critical, real-time components.
Even traditional HDDs, while offering superior cost-per-TB and endurance for sequential writes, aren’t a silver bullet. Standard desktop HDDs lack the firmware optimizations found in surveillance-grade drives. They’re not designed for 24/7 continuous streaming from multiple sources. They can struggle with rotational vibration in multi-drive enclosures, leading to dropped frames. Their seek times are also much slower than SSDs, making them unsuitable for the rapid, random I/O required by the Frigate database and snapshot storage.
The trap is thinking you can optimize for one aspect (cost, capacity, raw speed) without considering the others. Frigate demands a balanced approach, leveraging the strengths of different storage technologies for different parts of its workload.
| Storage Tier / Type | Primary Frigate Role | Key Advantages for Frigate | Critical Disadvantages / Traps | Recommended Hardware / Specs |
|---|---|---|---|---|
Tier 1: In-Memory tmpfs RAM Disk |
Raw 5-second video segment buffering (/tmp/cache) |
Near-zero latency, infinite write endurance, eliminates initial disk I/O bottlenecks, prevents dropped frames. | Volatile (data lost on reboot), limited by system RAM, not for long-term storage. | Sufficient system RAM (e.g., 4GB-8GB dedicated for tmpfs for 10x 4K cameras). |
| Tier 2: High-Endurance NVMe SSD | Frigate database (frigate.db), event snapshots, short-term clips (e.g., 24-48 hours) |
Extremely low latency for random I/O, high IOPS for database operations, fast snapshot writes/reads, high TBW endurance (TLC/MLC). | Higher cost/TB, consumer QLC drives have poor endurance for this workload, limited capacity for long-term storage. | PCIe Gen3/4 NVMe, TLC/MLC NAND, high TBW (e.g., >600 TBW for 1TB drive), DRAM cache. Examples: Samsung 970 Pro/Evo Plus, WD Black SN750/850. |
| Tier 3: Dedicated Surveillance HDDs | Continuous 24/7 long-term video recording (e.g., 7+ days retention) | Excellent cost/TB for large capacities, optimized firmware for continuous streaming (ATA streaming, TLER), rotational vibration sensors, high endurance for sequential writes. | Slow random I/O (unsuitable for database), higher latency than SSDs, not ideal for event snapshots, requires careful sizing for retention. | Western Digital Purple, Seagate SkyHawk (AI models for higher camera counts), 7200 RPM preferred, appropriate capacity for desired retention. |
| Network Attached Storage (NAS) | Optional: Long-term archive, redundant storage, secondary backup of events. | Centralized storage, RAID for redundancy, easy expansion, accessible from multiple clients. | Introduces network latency, potential for database locking errors if frigate.db is on NAS, requires 2.5GbE/10GbE for performance, adds network complexity. |
NFS preferred over SMB for Linux hosts, 2.5GbE or 10GbE network, dedicated surveillance HDDs within the NAS. |
Building Your Bulletproof Frigate Storage System: A Tiered Approach
The solution to Frigate’s demanding storage profile is a carefully designed 3-tier architecture. This isn’t about throwing money at the problem; it’s about intelligent resource allocation, ensuring each component handles the workload it’s best suited for. Let’s break down how to implement this, step-by-step.
Step 1: The RAM Disk (tmpfs) – Your First Line of Defense Against Dropped Frames
The most critical bottleneck for Frigate is often the initial write of those 5-second video segments. By default, Frigate writes these directly to disk. If your disk can’t keep up, frames are dropped. The elegant solution is to use an in-memory tmpfs RAM disk for this initial buffering. RAM is orders of magnitude faster than even the fastest NVMe SSD, offering near-zero latency and effectively infinite write endurance.
How it works: Frigate writes the raw 5-second segments to /tmp/cache (or whatever path you configure for cache_dir). Once a segment is complete and processed, it’s then moved to its final destination on your long-term storage. This decouples the real-time, high-frequency write operation from the slower, more enduring storage, ensuring no frames are dropped due to disk I/O.
Sizing your tmpfs: For ten 4K cameras, you’ll want a generous buffer. Each 5-second segment from a 4K camera might be 5-8MB. If you have 10 cameras, that’s 50-80MB per 5 seconds. Frigate typically keeps a few segments in memory. A good rule of thumb is to allocate at least 500MB per 4K camera, so for 10 cameras, aim for 5GB. However, 4GB is often sufficient for 10x 4K streams if your system is otherwise optimized. It’s better to slightly over-allocate than under. Remember, this RAM is dedicated and won’t be available for other applications.
Implementation:
- Allocate RAM for
tmpfs: Add an entry to your/etc/fstab(on Linux hosts) or configure your Docker container’stmpfsmount.
This line creates a 4GB RAM disk mounted attmpfs /tmp/cache tmpfs rw,size=4G,noatime,mode=1777 0 0/tmp/cache. Adjustsize=4Gas needed. - Configure Frigate: In your
frigate.yml, ensure yourcache_dirpoints to this mount:cache_dir: /tmp/cache
After a reboot or remount, Frigate will use this lightning-fast RAM disk for its initial segment buffering.
Step 2: The NVMe SSD – Your High-Performance Workhorse for Database and Events
This tier is crucial for Frigate’s responsiveness and stability. The SQLite database (frigate.db) experiences constant small, random writes and reads as events are logged, objects are detected, and snapshots are stored. Event snapshots and short-term clips (e.g., 24-48 hours) also benefit immensely from the low latency and high IOPS of an NVMe SSD.
Why NVMe, and not just any SSD? NVMe drives leverage the PCIe bus, offering significantly higher bandwidth and lower latency than SATA SSDs. More importantly, you need a drive with high write endurance (TBW). Look for:
- TLC or MLC NAND: Avoid QLC drives at all costs for this workload. TLC (Triple-Level Cell) offers a good balance of cost and endurance, while MLC (Multi-Level Cell) is even better but more expensive.
- High TBW Rating: A 1TB NVMe drive should have a TBW rating of at least 600 TBW, preferably higher. Enterprise-grade NVMe drives are ideal if your budget allows, but high-end consumer drives like the Samsung 970 Pro/Evo Plus, WD Black SN750/850, or Crucial P5 Plus are excellent choices.
- DRAM Cache: Essential for consistent performance and endurance.
Sizing your NVMe: For the database and snapshots, 250GB to 500GB is usually ample. If you plan to keep short-term clips (e.g., 24-48 hours) on this drive, you’ll need more. For 10x 4K cameras, retaining 24 hours of clips might require 200-300GB. A 1TB high-endurance NVMe is a sweet spot, offering plenty of room for the database, snapshots, and a few days of critical event clips.
Implementation:
- Install and Format: Install your chosen NVMe SSD and format it with a robust filesystem like ext4.
- Mount Point: Create a dedicated mount point, e.g.,
/mnt/frigate_nvme. - Configure Frigate: Point your Frigate data directory to this NVMe mount. This is where
frigate.db, event snapshots, and potentially short-term recordings will reside.
Or, if Frigate is running directly on the host:# In your docker-compose.yml or Frigate container setup volumes: - /mnt/frigate_nvme/frigate_data:/data - /tmp/cache:/tmp/cache:rw # If using tmpfs inside container
Ensure your# In frigate.yml database: path: /mnt/frigate_nvme/frigate.db record: # If you want short-term clips here path: /mnt/frigate_nvme/recordings/datadirectory (wherefrigate.dbresides by default) is mapped to your NVMe drive.
Step 3: Dedicated Surveillance HDDs – Your Long-Term Archive
For continuous 24/7 recording and long-term retention (e.g., 7+ days, 30 days, or more), dedicated surveillance-grade HDDs are the champions. They offer the best cost-per-TB and are engineered specifically for the demanding, continuous write workloads of NVRs.
Why surveillance HDDs?
- Optimized Firmware: Drives like Western Digital Purple or Seagate SkyHawk feature firmware optimized for ATA streaming commands, ensuring zero dropped frames during continuous writes. They prioritize write integrity over read speed, which is exactly what an NVR needs.
- Rotational Vibration (RV) Sensors: Crucial in multi-drive enclosures (like a server or NAS) to mitigate vibration, which can degrade performance and reliability.
- TLER (Time-Limited Error Recovery): Prevents drives from dropping out of a RAID array due to extended error recovery attempts, enhancing array stability.
- Higher Workload Rating: Designed for 24/7 operation and higher annual workload limits compared to desktop drives.
Sizing your HDDs for Retention: This is a critical calculation. A 4K stream at 8-12 Mbps (H.264/H.265) translates to roughly 1-1.5 MB/s. For 10 cameras: 10-15 MB/s. Daily usage: 10 MB/s * 60 seconds * 60 minutes * 24 hours = 864,000 MB/day = ~0.86 TB/day. For 7 days retention: 0.86 TB/day * 7 days = ~6 TB. For 30 days retention: 0.86 TB/day * 30 days = ~26 TB.
Always factor in a buffer (e.g., 20-30%) for variable bitrates and future expansion. So, for 30 days of 10x 4K cameras, you’d be looking at 30-35TB of usable storage. Consider using multiple smaller drives in a RAID configuration (e.g., RAID10 or RAIDZ) for redundancy and increased performance, or a single large drive if redundancy isn’t a primary concern.
Implementation:
- Install and Configure: Install your surveillance HDDs. If using multiple, consider a RAID array (hardware or software RAID like ZFS/mdadm) for redundancy and performance.
- Mount Point: Create a dedicated mount point, e.g.,
/mnt/frigate_recordings. - Configure Frigate: Point Frigate’s long-term recording path to this mount.
# In frigate.yml record: enabled: True retain: days: 30 # Or your desired retention path: /mnt/frigate_recordings/clips
Considering Network Attached Storage (NAS) for Frigate
While I strongly advise against placing the Frigate database (frigate.db) on a network share due to latency and potential locking issues, a NAS can be an excellent option for the long-term archive tier (Tier 3) or for secondary backups of events. If you already have a robust NAS with surveillance-grade HDDs, you can leverage it.
Network Requirements: For 10x 4K cameras, a 1GbE link to your NAS is simply not enough for continuous recording. You’ll saturate it quickly. A 2.5GbE or, ideally, a 10GbE connection is essential to prevent network bottlenecks and dropped frames. Ensure both your Frigate host and your NAS have compatible network interfaces and that your network switch supports the higher speeds.
NFS vs SMB: For Linux-based Frigate hosts, NFS (Network File System) is generally preferred over SMB (Server Message Block). NFS typically offers lower overhead and better performance for Linux clients. Ensure your NFS share is configured with appropriate options (e.g., async, noatime) for performance.
Database Locking Errors: If you must put any Frigate component on a NAS, ensure it’s only the long-term recordings. Never the /data directory (which contains frigate.db). Database locking errors often manifest as Frigate becoming unresponsive, failing to save events, or even crashing. These are almost always related to high latency or unreliable I/O to the database file.
Implementation (for NAS as Tier 3):
- Network Upgrade: Ensure 2.5GbE or 10GbE connectivity between Frigate host and NAS.
- NAS Configuration: Create an NFS share on your NAS, ensuring it’s accessible by your Frigate host. Use surveillance-grade HDDs within the NAS.
- Mount NAS on Frigate Host: Mount the NFS share locally on your Frigate host, e.g.,
/mnt/frigate_nas_recordings.# In /etc/fstab for NFS nas_ip:/volume1/frigate_recordings /mnt/frigate_nas_recordings nfs defaults,noatime,hard,intr 0 0 - Configure Frigate: Point Frigate’s recording path to this mount.
# In frigate.yml record: enabled: True retain: days: 30 path: /mnt/frigate_nas_recordings/clips
The Actionable Playbook: Setting Up Your Frigate Storage Today
Here’s a concrete, step-by-step guide to implement this robust 3-tier storage architecture for your Frigate NVR.
-
Assess Your Hardware & Needs:
- RAM: Do you have at least 8GB of RAM in your Frigate host? (4GB for OS/Frigate, 4GB for
tmpfs). More is always better. - NVMe Slot: Does your motherboard have an available M.2 NVMe slot?
- HDD Bays: Do you have available SATA ports and drive bays for surveillance HDDs?
- Camera Count & Resolution: How many 4K cameras? This dictates
tmpfssize and HDD capacity. - Retention Policy: How many days of continuous recording do you need? This dictates HDD capacity.
- RAM: Do you have at least 8GB of RAM in your Frigate host? (4GB for OS/Frigate, 4GB for
-
Acquire the Right Storage Hardware:
- High-Endurance NVMe SSD: A 1TB TLC/MLC NVMe with high TBW (e.g., Samsung 970 Evo Plus, WD Black SN750/850).
- Surveillance HDDs: Western Digital Purple or Seagate SkyHawk, sized appropriately for your retention needs (e.g., 8TB, 12TB, 16TB). Consider multiple drives for RAID.
-
Prepare Your Linux Host (or Docker Environment):
- Install NVMe & HDDs: Physically install the drives.
- Format Drives: Format your NVMe and HDDs with
ext4. Example:sudo mkfs.ext4 /dev/nvme0n1p1andsudo mkfs.ext4 /dev/sdb1. - Create Mount Points:
sudo mkdir -p /mnt/frigate_nvme sudo mkdir -p /mnt/frigate_recordings - Configure
/etc/fstabfor Persistence:Add entries for your NVMe, HDDs, and
tmpfs. Use UUIDs for reliability (get withsudo blkid).UUID=[NVME_UUID] /mnt/frigate_nvme ext4 defaults,noatime 0 2 UUID=[HDD_UUID] /mnt/frigate_recordings ext4 defaults,noatime 0 2 tmpfs /tmp/cache tmpfs rw,size=4G,noatime,mode=1777 0 0Adjust
size=4Gfortmpfsbased on your RAM and camera count. - Mount Drives:
sudo mount -ato mount everything. Verify withdf -h. - Set Permissions: Ensure the user Frigate runs as (e.g., the Docker user or your system user) has read/write access to
/mnt/frigate_nvme,/mnt/frigate_recordings, and/tmp/cache.sudo chown -R frigate_user:frigate_group /mnt/frigate_nvme /mnt/frigate_recordings /tmp/cache sudo chmod -R 775 /mnt/frigate_nvme /mnt/frigate_recordings /tmp/cache
-
Update Your Frigate Configuration (
frigate.ymlanddocker-compose.yml):docker-compose.yml(if using Docker):version: "3.9" services: frigate: container_name: frigate # ... other Frigate config ... volumes: - /etc/localtime:/etc/localtime:ro - /tmp/cache:/tmp/cache:rw # Mount the host's tmpfs - /mnt/frigate_nvme/frigate_data:/data:rw # For frigate.db, snapshots, events - /mnt/frigate_recordings:/media/frigate/recordings:rw # For long-term clips # ... other volumes ... # ... other Frigate config ...Note:
/datainside the container is where Frigate expects its database and config. We map this to our NVMe./media/frigate/recordingsis
AudioQuest Niagara vs Furman Power Conditioning Test • SkyConnect vs Sonoff ZBDongle-E Zigbee Range Test • Dolby Atmos Speaker Placement: 7.2.4 Ceiling Angles • Dirac Live vs Audyssey MultEQ XT32 Room Calibration • Lutron Caseta vs RA3: Smart Lighting Architecture.
Local voice and computer vision both demand robust on-premise compute and low-latency storage. Review storage architectures in Home Assistant Local Voice: Whisper & Piper Tuning.

