HAMMER 54D/Many: Performance tuning.
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 13 Jun 2008 00:25:33 +0000 (00:25 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 13 Jun 2008 00:25:33 +0000 (00:25 +0000)
commit7bc5b8c2a909fddf8d45ce56937a8507c742b76d
treedaf960f711d559c0b4fed0315926225f7c2be289
parentacf2a718e0c591197bf60a21ac025588010c5083
HAMMER 54D/Many: Performance tuning.

* Remove major barriers to write performance and fix hicups revealed by
  blogbench.

  Change the HAMMER reclaim-delay algorithm to operate like a FIFO instead
  of as a free-for-all.  The idea of introducing a dynamic delay helped some,
  but the addition of the wakeup FIFO allows burst completions by the flusher
  to immediately wakeup processes that were waiting for the reclaim count to
  drain.  The result is far, far smoother operation.

* Remove a major blocking conflict between the buffer cache daemon and
  HAMMER.  The buffer cache was getting stuck on trying to overwrite dirty
  records that had already been queued to the flusher.  The flusher might
  not act on the record(s) for a long period of time, causing the buffer
  cache daemon to stall.

  Fix the problem by properly using the HAMMER_RECF_INTERLOCK_BE flag,
  which stays on only for a very short period of time, instead of testing
  the record's flush state (record->flush_state), which can stay in
  the HAMMER_FST_FLUSH state for a very long time.

* The parent B-Tree node does not need to be locked when inserting
  into the child.

* Use the new B_AGE semantics to keep meta-data intact longer.  This results
  in another big improvement in random read and write performance.
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_btree.c
sys/vfs/hammer/hammer_cursor.c
sys/vfs/hammer/hammer_flusher.c
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_io.c
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_vfsops.c
sys/vfs/hammer/hammer_vnops.c