The performance of a TrueNAS system depends on many factors. In this article, we cover the most important levers and best practices to get the maximum out of your TrueNAS installation.
Hardware Fundamentals
RAM Is Critical
ZFS is a memory-hungry file system, and sufficient RAM is the single most important factor for good performance:
- Minimum 8 GB RAM for simple NAS setups
- 1 GB RAM per TB of storage as a rule of thumb
- ECC RAM is strongly recommended to ensure data integrity
- More RAM means more ARC cache and therefore faster read access
SLOG and L2ARC
Dedicated caching devices can significantly boost performance:
-
SLOG (Separate Log Device) — accelerates synchronous write operations
- Ideal: Enterprise NVMe SSDs with power-loss protection
- Especially important for iSCSI and NFS with synchronous writes
- Small, fast SSDs are sufficient (16-64 GB)
-
L2ARC (Level 2 Adaptive Replacement Cache) — extends the read cache
- Useful when working data exceeds available RAM
- Use SSDs as L2ARC devices
- Since OpenZFS 2.0, L2ARC is persistent across reboots
Disk Configuration
Choosing the right RAID-Z level has a direct impact on performance:
- RAID-Z1 (Single Parity) — good write performance, suitable for up to 5 disks
- RAID-Z2 (Double Parity) — recommended for larger arrays, double parity
- RAID-Z3 (Triple Parity) — for very large arrays with many disks
- Mirror (RAID 1) — best performance, but highest cost per TB
- Striped Mirrors — optimal combination of performance and redundancy
Network Connectivity
- 10 GbE or faster for storage networks
- Link Aggregation (LACP) for higher throughput
- Jumbo Frames (MTU 9000) enabled for better network efficiency
- Dedicated storage network separated from management traffic
ZFS Tuning
Record Size
The record size (block size) affects performance depending on the workload:
- 128K (default) — good for most workloads
- 1M — optimal for sequential workloads (backups, media streaming)
- 16K-64K — better for databases and VMs
- Record size should be matched to the typical I/O size
Compression
LZ4 compression should always be enabled:
- Minimal CPU overhead
- Reduces the amount of data that needs to be written
- In many cases, actually improves throughput
- Saves storage space with no significant performance penalty
ARC Tuning
The ARC (Adaptive Replacement Cache) can be optimized:
- primarycache=all (default) — cache both data and metadata
- primarycache=metadata — cache metadata only (useful for very large datasets)
- ARC size adjustable via system variables
- Monitor ARC hit ratio for optimization
Deduplication
Use deduplication with caution:
- Extremely memory-intensive (approx. 5 GB RAM per TB of deduplicated data)
- Only worthwhile with genuinely duplicated data
- In most cases, compression is the better choice
- Can significantly degrade performance
Network Optimization
SMB/CIFS Tuning
- Enable SMB Multi-Channel for higher throughput
- Optimized SMB configuration for Windows clients
- Configure the appropriate SMB version (SMB3 recommended)
NFS Tuning
- NFS v4.1/v4.2 for improved performance
- Adjusted thread count for NFS server
- Optimized mount options on the client side
iSCSI Tuning
- MPIO (Multi-Path I/O) for redundancy and load balancing
- Adjusted initiator settings
- Enable Jumbo Frames across the entire path
Monitoring and Diagnostics
Key Metrics
The following values should be checked regularly:
- ARC Hit Ratio — should be above 90%
- Disk I/O Latency — indicator of bottlenecks
- Network Throughput — detect saturation
- CPU Utilization — especially during compression and scrubs
- Pool Fragmentation — can impact performance
ZFS Scrubs
Regular scrubs are essential for data integrity:
- Monthly scrubs recommended
- Scrubs run in the background with low priority
- Duration depends on the amount of data
- Errors are automatically detected and corrected when redundancy is available
Conclusion
Optimizing the performance of a TrueNAS system requires a holistic approach: from the right hardware selection to ZFS tuning to network configuration. The most important factors are sufficient RAM, the right RAID configuration, and LZ4 compression. As a TrueNAS partner, we are happy to advise you on planning and optimizing your storage solution.
More on these topics:
More articles
Vaultwarden: Self-Hosted Password Manager for Teams
Run Vaultwarden as a self-hosted password manager: Docker deployment, reverse proxy, SMTP, 2FA enforcement, and backup strategy — the complete guide for teams.
Fail2ban: Automating Brute-Force Protection for Linux Servers
Install and configure Fail2ban: log parsing, jail.local, protecting SSH, Nginx, Postfix, and Dovecot, whitelists, email alerts, and a comparison with CrowdSec, sshguard, and CSF.
TrueNAS Dataset Encryption: ZFS Encryption in Practice
Understanding and implementing TrueNAS ZFS Encryption: dataset vs. pool encryption, passphrase vs. key file, key management, and performance impact with AES-NI.