Sunday, November 23, 2014

FreeBSD 9.2 Feature Highlight: ZFS General Improvements

Along with the many user facing changes discussed previously, there are also a number of internal changes to ZFS that will be available with the release of FreeBSD 9.2.

  • Asynchronous destruction of datasets - ZFS will no longer make you wait while it does the house keeping to destroy a dataset and free the space that was formerly used by that dataset, the zfs command will return and the work will continue in the background
  • Structural changes to the way snapshots track blocks that have changed and are no longer part of the snapshot, these changes result in higher performance when there are many snapshots and also reduce the space utilized by snapshots
  • Single Copy ARC - The ZFS ARC (Adaptive Replacement Cache) is where ZFS caches data and metadata to improve performance. In previous versions of ZFS, if you accessed the same block from a dataset, and then from a clone or snapshot of that dataset, that block would end up in the ARC twice. With this improvement the block will only be stored in the ARC once allowing more unique blocks to be cached at one time
  • ZIO nop-write - If your dataset has a cryptographically secure hash (SHA256) and dataset compression enabled, ZFS will now compare the checksum of the compressed block with the existing block before it is written. If the hashes match then the block is not written, saving I/O as well as reducing space consumption (if there were any snapshots of the block that would have changed, then additional space would have been consumed)
  • Parallel processing of free operations - Previous versions of ZFS only used a single thread to reclaim free space. The new system now frees blocks asynchronously in parallel
  • Spacemap improvements - The latest version of ZFS includes enhancements that greatly improve write performance to highly fragmented pools 
  • Improved DTrace support - A number of new DTrace probes have been added to ZFS to make it easier to track what is happening inside ZFS. Additionally a new error probe has been implemented throughout ZFS that will make it easier to pinpoint the source of any error messages


In addition to the above, it is also now possible to add a comment to a zpool which is output as part of the list returned by the zpool import command.