zfs ram
zfs_ramCalculate recommended RAM and ARC sizing for a ZFS storage pool based on workload type, pool size, deduplication status, and L2ARC cache size. Computes minimum and recommended RAM in gigabytes, ARC target size, and dedup table overhead. Accounts for workload-specific IO patterns: NAS (sequential, 1GB/TB), database (random, 2GB/TB), virtualization (mixed, 1.5GB/TB). Deduplication adds approximately 5GB per TB for the DDT. L2ARC index requires 1GB RAM per 10GB of L2ARC. Essential for TrueNAS, FreeNAS, and custom ZFS server builds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workload | No | Primary workload type: general (mixed), nas (sequential reads/writes), database (random IO), virtualization (mixed random) | general |
| pool_size_tb | Yes | Total usable pool size in terabytes | |
| dedup_enabled | No | Whether ZFS deduplication is enabled (significantly increases RAM requirements) | |
| l2arc_size_gb | No | Size of L2ARC (read cache SSD) in gigabytes; requires additional RAM for index |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | Human-readable sizing rationale and recommendations | |
| min_ram_gb | Yes | Minimum recommended RAM in gigabytes for stable operation | |
| arc_target_gb | Yes | Target ARC (Adaptive Replacement Cache) size in gigabytes | |
| dedup_table_gb | Yes | Estimated dedup table (DDT) RAM requirement in gigabytes | |
| recommended_ram_gb | Yes | Recommended RAM in gigabytes for optimal performance (2x minimum) |