OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: spetrillo on August 07, 2024, 07:49:58 PM

Title: 24.7 Memory Widget
Post by: spetrillo on August 07, 2024, 07:49:58 PM
Hello all,

Forst off kudos to the developers for a clean 24.7 update, even with a couple hotfixes. I love the new dashboard but got a question on the memory widget. It is showing approximately 3 gig used for something called ARC. What is that?

Thanks,
Steve
Title: Re: 24.7 Memory Widget
Post by: Taunt9930 on August 07, 2024, 07:52:25 PM
Memory Cache associated with ZFS, which presumably you are using as the file system.
Title: Re: 24.7 Memory Widget
Post by: spetrillo on August 07, 2024, 07:59:39 PM
Thank you for the quick response. Yes its ZFS...but not for much longer. I see no reason to use ZFS on a single drive, unless someone explains why I am wrong.
Title: Re: 24.7 Memory Widget
Post by: franco on August 07, 2024, 08:08:23 PM
Data corruption, especially prevalent in sqlite database. Random issues with kernel update and reboot losing the kernel. No ability for snapshots. If you don't mind these issues you can use UFS.

Note with 24.7 we more or less recommend ZFS by default now although it is heavier on SSDs than it should be.


Cheers,
Franco
Title: Re: 24.7 Memory Widget
Post by: Patrick M. Hausen on August 07, 2024, 08:08:41 PM
Snapshots before a major upgrade and rollback? Knowing your data is ok instead of guessing? Even with a single drive ZFS checksums everything.
Title: Re: 24.7 Memory Widget
Post by: doktornotor on August 07, 2024, 09:51:21 PM
Quote from: spetrillo on August 07, 2024, 07:59:39 PM
Thank you for the quick response. Yes its ZFS...but not for much longer. I see no reason to use ZFS on a single drive, unless someone explains why I am wrong.

Yeah, except for the time wasted on way too many travels to replace unbootable firewall boxes, tons of time wasted on completely broken UFS fscks and shipping routers back and forth, there's indeed no compelling reason.  :P
Title: Re: 24.7 Memory Widget
Post by: Patrick M. Hausen on August 07, 2024, 09:53:50 PM
Quote from: doktornotor on August 07, 2024, 09:51:21 PM
Yeah, except for the time wasted on way too many travels to replace unbootable firewall boxes, tons of time wasted on completely broken UFS fscks and shipping routers back and forth, there's indeed no compelling reason.  :P

this!.gif  :)
Title: Re: 24.7 Memory Widget
Post by: doktornotor on August 07, 2024, 09:59:07 PM
Beyond the above, I would suggest reading some some FreeBSD docs regarding vfs.zfs.arc.min, vfs.zfs.arc.max, vfs.zfs.prefetch.disable and vfs.zfs.arc.free_target tunables.
Title: Re: 24.7 Memory Widget
Post by: jlficken on August 08, 2024, 04:15:27 AM
Quote from: franco on August 07, 2024, 08:08:23 PM
Data corruption, especially prevalent in sqlite database. Random issues with kernel update and reboot losing the kernel. No ability for snapshots. If you don't mind these issues you can use UFS.

Note with 24.7 we more or less recommend ZFS by default now although it is heavier on SSDs than it should be.


Cheers,
Franco

Do you still recommend ZFS if it's a VM on Proxmox that's already using ZFS?
Title: Re: 24.7 Memory Widget
Post by: Patrick M. Hausen on August 08, 2024, 07:07:15 AM
No. In virtualised environments ZFS can be counter productive, because "thin" provisioning of virtual disks doesn't work as intended. Due to the copy on write nature of ZFS every virtual disk will grow to its maximum size.

You can snapshot and incrementally backup the entire virtual disk easily if it is stored on ZFS, already.
Title: Re: 24.7 Memory Widget
Post by: jlficken on August 08, 2024, 03:41:32 PM
I'm guessing then that my best option is to create a new VM with UFS and import the config, correct?
Title: Re: 24.7 Memory Widget
Post by: Patrick M. Hausen on August 08, 2024, 03:53:17 PM
Yes.
Title: Re: 24.7 Memory Widget
Post by: spetrillo on August 11, 2024, 05:32:14 PM
Quote from: doktornotor on August 07, 2024, 09:51:21 PM
Quote from: spetrillo on August 07, 2024, 07:59:39 PM
Thank you for the quick response. Yes its ZFS...but not for much longer. I see no reason to use ZFS on a single drive, unless someone explains why I am wrong.

Yeah, except for the time wasted on way too many travels to replace unbootable firewall boxes, tons of time wasted on completely broken UFS fscks and shipping routers back and forth, there's indeed no compelling reason.  :P

All of my OPNsense implemenations, with the exception of one, are all virtual. The one in question is physical, although I do not remember why I would select ZFS. Anyways can someone point me to some documentation on rollbacks and copies? I can see where I would want to make a copy before I apply any updates.
Title: Re: 24.7 Memory Widget
Post by: Patrick M. Hausen on August 11, 2024, 05:35:49 PM
Quote from: spetrillo on August 11, 2024, 05:32:14 PM
Anyways can someone point me to some documentation on rollbacks and copies? I can see where I would want to make a copy before I apply any updates.

https://forum.opnsense.org/index.php?topic=25540.0
https://vermaden.wordpress.com/wp-content/uploads/2018/11/nluug-zfs-boot-environments-reloaded-2018-11-15.pdf
https://man.freebsd.org/cgi/man.cgi?query=bectl&sektion=8&manpath=freebsd-release

EDIT: thanks @haemm0r for this post:
https://forum.opnsense.org/index.php?topic=42052.msg207709#msg207709

I recommend starting with the Klara article linked therein. Klara is one the top educational resources for BSD and ZFS.

HTH,
Patrick