I ran OPNSense on an 8 GB mini PC for years. With Zenarmor on the LAN side and Suricata IPS on the WAN side, the RAM usage was almost at its limit at around 80%. I recently upgraded to a 16 GB system, reinstalled all the services and restored a backup. However, on the 16 GB system, it now only uses about 4.5 GB of RAM, whereas it used 6,5 GB on the 8 GB system.
Can anyone explain this?
Could it be because of the latest OPNSense software?
Screenshot 2026-03-09 190724.png
ZFS likes to cache things, and after a reboot its cache is empty. I expect the RAM usage to increase to slightly below maximum over time. This is not detrimental because ZFS will evict stuff once memory starts getting scarce. This is how it behaves on file servers, anyway, so I'd expect it to be similar when used as root FS.
Even with UFS or Ext4 every modern Unix system will eventually put all memory which is not otherwise used to cacheing. Unused memory is wasted memory. ZFS is just a bit more aggressive about it.
Quote from: drosophila on March 09, 2026, 07:39:30 PMZFS likes to cache things, and after a reboot its cache is empty. I expect the RAM usage to increase to slightly below maximum over time.
Quote from: Patrick M. Hausen on March 09, 2026, 08:32:36 PMEven with UFS or Ext4 every modern Unix system will eventually put all memory which is not otherwise used to cacheing.
Thank you.But maybe you got me wrong.
It is not about ZFS using RAM. My old and my new system were configured in the same way (restore of backup). The new system has double amount of RAM but still is using less: 4,5 GB instead of 6,5 GB. This somehow I cannot explain.
Since you were considering a change in default values or failure to restore, are these settings the same:
Firewall: Settings: Advanced -> Miscellaneous -> Firewall Maximum States and Firewall Maximum Table Entries
System: Settings: Miscellaneous -> Disk / Memory Settings (reboot to apply changes)
...?