DragonFly kernel List (threaded) for 2009-08
DragonFly BSD
DragonFly kernel List (threaded) for 2009-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Supported swap space increased.


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Aug 2009 15:46:08 -0700 (PDT)

    The swap/paging code is now able to configure up to 1TB x 4 = 4TB of swap,
    up from 8G x 4 = 32G of swap.  I have tested 256G of configured swap on
    a 64-bit kernel.

    However, because the kernel must allocate tracking structures for each
    block of paged-out swap the practical limit is going to be somewhat
    lower.  Approximately 1MB of kernel memory must be wired for every
    1GB of swap which is in-use.  So, for example, supporting 64G of in-use
    swap requires 64M of wired physical memory.  Just having that much
    swap will not eat much memory, its using it that eats memory.

    On i386 about 32M of KVM is reserved by default, giving us a practical
    limit of 32G of swap.

    On 64-bit about 512M of KVM is reserved by default, giving us a
    practical limit of 512G of swap.  Of course, actually using that much
    will wire 512M of system ram so don't get carried away :-)

    The KVM allocation can be changed by setting kern.maxswzone in
    /boot/loader.conf, e.g.

	kern.maxswzone=64m

    Note that kernel virtual memory (KVM) is limited on 32 bit kernels
    and you really can't specify a value much larger then 64m.  64-bit
    kernels have a 512G KVM space and do not have that problem, hence
    the higher default reservation.

    There are some intriguing possibilities with the use of SSD-backed
    swap space.  I will be looking into how such a space might be used
    for caching in the cluster work.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]