ZFS RAM Limits
ZFS is known for its memory usage, as it leverages RAM for caching to improve performance. Specifically, ZFS uses the ARC (Adaptive Replacement Cache) to store frequently accessed data in memory. While this behavior helps speed up disk reads, it can consume a large portion of available memory if not configured correctly, especially on systems with limited RAM.
Online sources vary as to what the default percentage ZFS is set for in Proxmox, and at the time of this wirting on v8.3, it was 50%, at least in my case.
Having that RAM available for ZFS is very important for performance, however, if it's too high, it can be adjusted as follows, as in my case, it's not critical (all personal use):
- Edit this file (it will create if not present already)
nano /etc/modprobe.d/zfs.conf
- Enter this:
options zfs zfs_arc_max=10307921510
- Save and close the file
- Execute this:
update-initramfs -u
- Reboot Proxmox
The above will limit the RAM to 30% of 32GB (what I have installed), and I use this to calculate that:
Calculate 30% of Your RAM:
Total RAM = 32 GB = 34,359,738,368 bytes (32 × 1024³).
30% of RAM = 10,307,921,510 bytes (34,359,738,368 × 0.3).