git: kernel - Reduce auto maxvnodes calculation

Matthew Dillon dillon at crater.dragonflybsd.org
Tue May 18 11:43:55 PDT 2021


commit 703335c46ed70823091eb510de46c712fd7a6639
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue May 18 11:30:11 2021 -0700

    kernel - Reduce auto maxvnodes calculation
    
    * Reduce the default kern.maxvnodes value further.  On low-memory systems
      reduce the calculation by roughly 40%.  On systems with more memory,
      reduce the calculation by roughly 60%.
    
      kern.maxvnodes has a large knock-on effect with kernel memory use.
      The number of struct vnode, struct vm_object, and various filesystem
      structures tend to scale with kern.maxvnodes.  These have gotten larger
      over the years.
    
      At the same time, block caching is now mostly done at the block-device
      level rather than the vnode level, particularly for HAMMER1 and HAMMER2
      filesystems.  Having a huge kern.maxvnodes setting just isn't necessary.
      Even on huge-memory machines, going beyond a few million isn't going to
      do a whole lot.
    
    * With these changes, a system with 2G of ram, maxvnodes drops from roughly
      70,000 to roughly 40,000.  On a system with 64G of ram, maxvnodes drops
      from the cap (4M) to around 1.6M.
    
    * This modestly reduces steady-state kernel wired memory use on
      systems with modest to high uptimes.

Summary of changes:
 sys/kern/vfs_subr.c | 44 +++++++++++++++++++++++++++++++-------------
 1 file changed, 31 insertions(+), 13 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/703335c46ed70823091eb510de46c712fd7a6639


-- 
DragonFly BSD source repository



More information about the Commits mailing list