freebsd-dev/cmd
Andriy Gapon 73f0e3e3e5 6902 speed up listing of snapshots if requesting name only and sorting by name
illumos/illumos-gate@0d8fa8f8eb
0d8fa8f8eb

https://www.illumos.org/issues/6902
  pjd has authored and commited a patch in Jan 21, 2012 that substanially speeds
  up zfs snapshot listing if requesting only the name property and sorting by
  name.
  In this special case, the snapshot properties do not need to be loaded. This
  code has been adopted by zfsonlinux on May 29, 2012.
  Commit message from pjd:
       Dramatically optimize listing snapshots when user requests only
       snapshot
       names and wants to sort them by name, ie. when executes:
          1. zfs list -t snapshot -o name -s name
       Because only name is needed we don't have to read all snapshot
       properties.
       Below you can find how long does it take to list 34509 snapshots from
       a single
       disk pool before and after this change with cold and warm cache:
       before:
          1. time zfs list -t snapshot -o name -s name > /dev/null
             cold cache: 525s
             warm cache: 218s
       after:
          1. time zfs list -t snapshot -o name -s name > /dev/null
             cold cache: 1.7s
             warm cache: 1.1s
  References:
  http://svnweb.freebsd.org/base?view=revision&revision=230438
  https://github.com/freebsd/freebsd/commit/8e3e9863
  https://github.com/zfsonlinux/zfs/commit/0cee2406

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Pawel Dawidek <pjd@freebsd.org>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Martin Matuska <martin@matuska.org>
2016-07-12 11:21:41 +00:00
..
dtrace 6734 dtrace_canstore_statvar() fails for some valid static variables 2016-03-17 18:49:37 +00:00
lockstat Import the lockstat(1) sources from OpenSolaris as of 20080410. 2009-06-18 17:25:38 +00:00
mdb/tools/common Vendor import of the full userland contrib part of DTrace support from 2008-04-26 00:54:52 +00:00
plockstat Import plockstat from OpenSolaris r12768. 2010-07-19 14:57:01 +00:00
pyzfs Update vendor/opensolaris to last OpenSolaris state (13149:b23a4dab3d50) 2012-07-18 07:48:04 +00:00
sgs Update vendor/opensolaris to last OpenSolaris state (13149:b23a4dab3d50) 2012-07-18 07:48:04 +00:00
stat/common Update vendor/illumos/dist and vendor-sys/illumos/dist 2013-02-11 08:07:56 +00:00
zdb 6418 zpool should have a label clearing command 2016-04-09 19:49:40 +00:00
zfs 6902 speed up listing of snapshots if requesting name only and sorting by name 2016-07-12 11:21:41 +00:00
zhack 5959 clean up per-dataset feature count code 2015-08-12 23:38:58 +00:00
zinject 6531 Provide mechanism to artificially limit disk performance 2016-03-08 16:11:59 +00:00
zlook Update vendor/opensolaris to last OpenSolaris state (13149:b23a4dab3d50) 2012-07-18 07:48:04 +00:00
zpool 6418 zpool should have a label clearing command 2016-04-09 19:49:40 +00:00
zstreamdump 5027 zfs large block support (add copyright) 2016-03-08 17:48:26 +00:00
ztest 5027 zfs large block support (add copyright) 2016-03-08 17:48:26 +00:00