Bug 235543

Summary: 19.6.1. Tuning: Inaccurate description of vfs.zfs.arc_max
Product: Documentation Reporter: Michael Laß <bevan>
Component: DocumentationAssignee: freebsd-doc mailing list <doc>
Status: Closed FIXED    
Severity: Affects Only Me CC: bcr
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Michael Laß 2019-02-05 23:16:38 UTC
The description of the default value for vfs.zfs.arc_max in the handbook (section 19.6.1.) is inaccurate. I propose phrasing it as follows:

"The default is all RAM but 1 GB, or 5/8 of all RAM, whichever is more."

Here is the actual code defining these default in sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c:

        /* set min cache to 1/32 of all memory, or arc_abs_min, whichever is more */
        arc_c_min = MAX(allmem / 32, arc_abs_min);
        /* set max to 5/8 of all memory, or all but 1GB, whichever is more */
        if (allmem >= 1 << 30)
                arc_c_max = allmem - (1 << 30);
                arc_c_max = arc_c_min;
        arc_c_max = MAX(allmem * 5 / 8, arc_c_max);
Comment 1 commit-hook freebsd_committer 2019-05-13 15:57:33 UTC
A commit references this bug:

Author: bcr
Date: Mon May 13 15:57:12 UTC 2019
New revision: 53010
URL: https://svnweb.freebsd.org/changeset/doc/53010

  Correct the description of vfs.zfs.arc_max.

  Update the description of the default value for the vgs.zfs.arc_max tunable.
  It changed since the chapter was written and this patch updates it to the
  definition in the code.

  PR:		235543
  Submitted by:	bevan@bi-co.net
  Reviewed by:	allanjude@

Comment 2 Benedict Reuschling freebsd_committer 2019-05-13 16:00:21 UTC
I just committed a patch with your suggested wording. Thanks for filing the PR, which is closed now.