RAM usage changed

Started by Tubs, March 09, 2026, 07:18:19 PM

Previous topic - Next topic
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?

You cannot view this attachment.

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.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

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)

...?

Today at 07:28:09 AM #5 Last Edit: Today at 07:29:48 AM by JamesFrisch
While I agree that empty RAM == wasted RAM, OP is asking about the increased RAM usage.
And since ARC is only the small, green part of that picture, my guess is he/she is not asking about the increased ARC usage, but the RAM usage.

And since OP is asking why the RAM usage got smaller, I would guess either something got better (IDK blocklist of unbound compressed or something like that?) or he/she changed something in the settings.

Quote from: pfry on Today at 03:21:08 AMSince 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)

I do not have a memory on all setting I might have tweaked over the last years. But I assumed that all setting are the same after a full system restore from backup.