HAMMER 46/Many: Performance pass, media changes, bug fixes.
commit2f85fa4d65e69cdd2ee4ed3da50f49a52009eb4c
authorMatthew Dillon <dillon@dragonflybsd.org>
Sun, 18 May 2008 01:48:50 +0000 (18 01:48 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sun, 18 May 2008 01:48:50 +0000 (18 01:48 +0000)
tree20345b77b96ede18311ecdf150dc2f30a166b24e
parent0728eafc4ce251ddab45b4aaa00e085785fc439d
HAMMER 46/Many: Performance pass, media changes, bug fixes.

* Add a localization field to the B-Tree element which has sorting priority
  over the object id.

  Use the localization field to separate inode entries from file data.  This
  allows the reblocker to cluster inode information together and greatly
  improves directory/stat performance.

* Enhance the reblocker to reblock internal B-Tree nodes as well as leaves.

* Enhance the reblocker by adding 'reblock-inodes' in addition to
  'reblock-data' and 'reblock-btree', allowing individual types of
  meta-data to be independantly reblocked.

* Fix a bug in hammer_bread().  The buffer's zoneX_offset field was
  sometimes not being properly masked, resulting in unnecessary blockmap
  lookups.  Also add hammer_clrxlate_buffer() to clear the translation
  cache for a hammer_buffer.

* Fix numerous issues with hmp->sync_lock.

* Fix a buffer exhaustion issue in the pruner and reblocker due to not
  counting I/O's in progress as being dirty.

* Enhance the symlink implementation.  Take advantage of the extra 24 bytes
  of space in the inode data to directly store symlinks <= 24 bytes.

* Use cluster_read() to gang read I/O's into 64KB chunks.  Rely on
  localization and the reblocker and pruner to make doing the larger
  I/O's worthwhile.

These changes reduce ls -lR overhead on 43383 files (half created with cpdup,
half totally randomly created with blogbench).  Overhead went from 35 seconds
after reblocking, before the changes, to 5 seconds after reblocking,
after the changes.
20 files changed:
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_blockmap.c
sys/vfs/hammer/hammer_btree.c
sys/vfs/hammer/hammer_btree.h
sys/vfs/hammer/hammer_cursor.h
sys/vfs/hammer/hammer_disk.h
sys/vfs/hammer/hammer_flusher.c
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_io.c
sys/vfs/hammer/hammer_ioctl.c
sys/vfs/hammer/hammer_ioctl.h
sys/vfs/hammer/hammer_object.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_prune.c
sys/vfs/hammer/hammer_reblock.c
sys/vfs/hammer/hammer_recover.c
sys/vfs/hammer/hammer_subs.c
sys/vfs/hammer/hammer_transaction.c
sys/vfs/hammer/hammer_vfsops.c
sys/vfs/hammer/hammer_vnops.c