Re: "failed to reclaim memory" with much free physmem
Date: Sat, 13 Sep 2025 00:46:33 UTC
On Fri, Sep 12, 2025 at 8:58 AM Garrett Wollman <wollman@bimajority.org> wrote: > > <<On Fri, 12 Sep 2025 08:50:10 -0700, Rick Macklem <rick.macklem@gmail.com> said: > > > Ok, but don't we want something that prevents the arc from taking all > > the memory? (It seems like 932Gbytes should be close to a hard > > upper bound for a system with 1Tbyte of ram?) > > Presently it says: > > kstat.zfs.misc.arcstats.c_max: 1098065367040 > > That's 1 TiB less 1379 MiB. Which in all honesty *ought to be enough* > for munin-node, nrpe, ntpd, sendmail, inetd, lldpd, nslcd, sshd, syslogd, > mountd, and nfsuserd. If you look at arc_default_max() in sys/contrib/openzfs/module/os/freebsd/arc_os.c you'll see it returns "allmem - 1Gbyte". This may make sense for a machine with a few Gbytes of ram, but I'd bump it up for machines like you have. (As I noted, a system that boots with 128Gbyte->1Tbyte of ram is going to size things a lot larger and "allmem" looks like the total ram in the system. They haven't even subtracted out what the kernel uses.) (Disclaimer: I know nothing about ZFS, so the above may be crap!!) It's a trivial function to patch, rick > > -GAWollman >