DragonFly BSD
DragonFly commits List (threaded) for 2011-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: HAMMER VFS - Implement swapcache for HAMMER data in double_buffer mode

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 2 Apr 2011 17:26:39 -0700 (PDT)

commit 18bee4a2762368921be967944760f01b314b01fd
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Sat Apr 2 17:16:15 2011 -0700

    HAMMER VFS - Implement swapcache for HAMMER data in double_buffer mode
    * Support swapcache data caching when HAMMER's double_buffer mode is enabled.
      Typically the following sysctls:
      vm.swapcache.meta_enable=1	(optional)
      vm.swapcache.use_chflags=0	(optional - see man swapcache)
    * This causes swapcache to attempt to cache file data from HAMMER
      filesystems stored via the block device instead of the individual
      file vnodes.
    * This allows swapcache to more efficiently cache file data without
      vnode recycling from a limited kern.maxvnodes value getting in the way.
      If you have a large dataset spread across many smaller files which would
      normally overwhelm maxvnodes, and even on large systems handling very
      large data sets where you wish to cache the file data for some of the
      files (using use_chflags=1 mode), this makes it possible to cache ALL
      the file data AND meta-data on the SSD even though the related vnodes
      cached by the kernel get recycled.
    * Whereas it may have been inefficient to turn on vm.swapcache.data_enable
      before, due to filesystem scans and such, it may now be possible to this
      feature on with double buffering also enabled.
      Note that you must still be cognizant of the aggregate amount of file
      data being accessed by your system if you have set use_chflags to 0, you
      simply no longer need to worry about how many files that data belongs to.
    * Enabling HAMMER's double_buffer mode will reduce performance somewhat for
      the normal best-case file caching, but it will also greatly improve
      performance once you start blowing out your memory caches.

Summary of changes:
 sys/vfs/hammer/hammer_btree.c   |    7 ++++++-
 sys/vfs/hammer/hammer_cursor.h  |    1 +
 sys/vfs/hammer/hammer_object.c  |    2 ++
 sys/vfs/hammer/hammer_reblock.c |    1 +
 sys/vfs/hammer/hammer_vnops.c   |   24 ++++++++++++++++++++++++
 5 files changed, 34 insertions(+), 1 deletions(-)


DragonFly BSD source repository

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