git: kernel - Increase KVM default for 32-bit systems from 1GB to 1.5GB

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Jun 13 13:40:50 PDT 2013


commit 6f7c4c3e0a21562c4afc3eb3b862dc5a83c106fe
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Jun 13 13:23:38 2013 -0700

    kernel - Increase KVM default for 32-bit systems from 1GB to 1.5GB
    
    * Increases KVA_PAGES default from 256 to 384, giving the kernel 1.5GB
      of KVM and userland 2.5GB (instead of 1/3).
    
    Numerous people running 32-bit systems are hitting resource limits and
    actually running out of KVM.  There are many reasons for why this is
    happening.  It isn't simply a resource-tuning issue because most of the
    resource limits we have today are already quite reasonable.  It's when
    the system combines to fully utilize multiple resources where the problems
    begin.  Tuning-down the resources impacts performance too much and makes
    the systems less usable.  PCI resources tend to reserve larger areas,
    system structures are fatter, and many other issues crop up.
    
    In addition, 32-bit systems today can be greatly extended by adding swapcache
    and swapcache requires significantly KVM resources.  For example, adding
    64GB of swapcache eats ~64MB of ram and heavy tmpfs use often requires an
    even higher ratio (64GB swap w/ kern.maxswzone=128m in /boot/loader.conf).
    With the price point for SSDs coming down, 256GB and larger SSDs are far
    more common these days and we want even 32-bit systems to be able to make
    use of them.
    
    On a fresh system boot well over 512MB of KVM out of the (previous) 1GB
    space is already accounted for.  This leaves precious little for dynamic
    expansion of system structures.
    
    This leaves us with one real option... increase KVM and decrease UVM.
    By increasing KVM from 1GB to 1.5GB we nearly double the KVM available to
    the kernel for dynamic expansion of system structures.  User virtual memory
    is reduced from 3GB down to 2.5GB.  While this may impact some applications
    such as Perl, those applications are already tending to run on the edge
    anyway and, in fact, modern application development is starting to assume
    64-bit address spaces for optimal operation anyway.
    
    I've come to the conclusion that it is better to move the line on UVM down
    in order to completely solve the KVM issue for system resources on 32-bit
    systems.

Summary of changes:
 sys/platform/pc32/include/pmap.h | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6f7c4c3e0a21562c4afc3eb3b862dc5a83c106fe


-- 
DragonFly BSD source repository


More information about the Commits mailing list