Solved 13.2-RELEASE-p6 shows ARC in TOP with no ZFS

I just upgraded to 13.2-RELEASE-p6 and I'm now seeing a new "ARC" line in TOP :

Code:
Mem: 718M Active, 9495M Inact, 144M Laundry, 2007M Wired, 981M Buf, 3698M Free
ARC: 3072B Total, 3072B Header

I'm not using ZFS on this dedicated server. Is this something I should be worried about?
 
Looking at the top code, that line gets displayed if:
Code:
        if (sysctlbyname("kstat.zfs.misc.arcstats.size", &arc_size, &size,
            NULL, 0) == 0 && arc_size != 0)
                arc_enabled = 1;

Probably you have the zfs module loaded for some reason?
 
I have nothing enabling ZFS in /boot/loader.conf, /etc/rc.conf or /etc/rc.conf.local

It is being loaded for some reason though :

Code:
$ kldstat
Id Refs Address                Size Name
 1   31 0xffffffff80200000  1f3e2d0 kernel
 2    1 0xffffffff82140000    20c48 geom_mirror.ko
 3    1 0xffffffff82520000     3ac8 ktls_ocf.ko
 4    1 0xffffffff82524000     3250 ichsmb.ko
 5    1 0xffffffff82528000     2180 smbus.ko
 6    1 0xffffffff8252b000     2110 pchtherm.ko
 7    1 0xffffffff8252e000     2240 pflog.ko
 8    1 0xffffffff82531000    3fa78 pf.ko
 9    1 0xffffffff82571000     21b0 accf_http.ko
10    1 0xffffffff82574000     20e0 accf_data.ko
11    1 0xffffffff82577000     4700 nullfs.ko
12    1 0xffffffff82600000   3c4778 zfs.ko
 
It *could* be a side effect of freebsd-update where it tries to handle BEs. I know it was fixed already, but could still be an issue in 13.2. Just reboot and check if zfs module is still being loaded.

Ok, I'll reboot the server tonight when traffic slows down and I'll report back.
 
grahamperrin cool find. I would expect that to happen:
zpool list looks for ZFS stuff, but it can't find that stuff if zfs.ko isn't loaded, so "lets load zfs.ko, check for zpools even if there aren't any".

Chicken, meet egg.
Now perhaps there are sysctls for zfs that don't exist if zfs.ko isn't loaded; that could be a way for the zpool command to check before loading zfs.ko.
 
It's not the command that loads the module, that's just the trigger. Had this happen with Puppet too. It can manage ZFS pools/datasets etc. Puppet agent gathering facts triggers loading of the ZFS kernel module. Even on systems that don't have ZFS. As far as I understood it's the kernel autoloading modules.
 
actually it seems that libzfs does it in libzfs_init
Code:
/*
 * Verify the required ZFS_DEV device is available and optionally attempt
 * to load the ZFS modules.  Under normal circumstances the modules
 * should already have been loaded by some external mechanism.
 */
int
libzfs_load_module(void)
{
        /*
         * XXX: kldfind(ZFS_KMOD) would be nice here, but we retain
         * modfind("zfs") so out-of-base openzfs userland works with the
         * in-base module.
         */
 
  • Like
Reactions: mer
It *could* be a side effect of freebsd-update where it tries to handle BEs. I know it was fixed already, but could still be an issue in 13.2. Just reboot and check if zfs module is still being loaded.

Rebooting the server solved the issue. The module is no longer being loaded.
 
any program that tries to init libzfs will load it
typing zpool bollocks at the prompt will get the module loaded because the lib gets inited before the command is parsed
you can manually unload it after then
 
Back
Top