git: hammer2 - Increase bulkfree buffer size request and cap

Matthew Dillon dillon at
Sat Mar 31 22:25:17 PDT 2018

commit a886bddb9b3e5d8e1a9257fd6ce9bdf4bc75e7c9
Author: Matthew Dillon <dillon at>
Date:   Sat Mar 31 22:02:22 2018 -0700

    hammer2 - Increase bulkfree buffer size request and cap
    * Increase the kernel buffer size cap for hammer2 cleanups
      (aka bulkfree's) from 64MB to 1/16 physical memory.  Systems
      with more memory can accomodate larger in-memory bulkfree bitmap
      buffers.  Systems with less memory simply do multiple scan
      passes as per usual.
    * Increase the buffer size requested by the hammer2 utility
      from 8MB to 1/16 physical memory.  The actual amount of memory
      allocated by the kernel will be 32MB per 1TB of filesystem, up to
      the cap.
    * This will generally reduce the number of scans required for
      a 4TB filesystem from 16 to 1, meaning that bulkfree will take
      1/16 the time as it did before for a filesystem of that size.
      For example, a system with 128GB of ram would be able to
      request up to 8GB of buffer which can accomodate a bulkfree
      operation on a 256TB filesystem in a single pass.

Summary of changes:
 sbin/hammer2/cmd_bulkfree.c        | 10 +++++++++-
 sys/vfs/hammer2/hammer2_bulkfree.c |  4 ++--
 2 files changed, 11 insertions(+), 3 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list