zfs/cmd
Pawel Jakub Dawidek 0cee24064a Speed up 'zfs list -t snapshot -o name -s name'
FreeBSD #xxx:  Dramatically optimize listing snapshots when user
requests only snapshot names and wants to sort them by name, ie.
when executes:

  # 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:

        # time zfs list -t snapshot -o name -s name > /dev/null
        cold cache: 525s
        warm cache: 218s

    after:

        # time zfs list -t snapshot -o name -s name > /dev/null
        cold cache: 1.7s
        warm cache: 1.1s

NOTE: This patch only appears in FreeBSD.  If/when Illumos picks up
the change we may want to drop this patch and adopt their version.
However, for now this addresses a real issue.

Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #450
2012-06-14 09:49:04 -07:00
..
mount_zfs Include <locale.h> to avoid error: 'LC_ALL' undeclared. 2012-06-11 10:21:40 -07:00
vdev_id Linux 3.4 compat, d_make_root() replaces d_alloc_root() 2012-06-11 10:04:49 -07:00
zdb Linux 3.4 compat, d_make_root() replaces d_alloc_root() 2012-06-11 10:04:49 -07:00
zfs Speed up 'zfs list -t snapshot -o name -s name' 2012-06-14 09:49:04 -07:00
zinject Linux 3.4 compat, d_make_root() replaces d_alloc_root() 2012-06-11 10:04:49 -07:00
zpios Linux 3.4 compat, d_make_root() replaces d_alloc_root() 2012-06-11 10:04:49 -07:00
zpool Linux 3.4 compat, d_make_root() replaces d_alloc_root() 2012-06-11 10:04:49 -07:00
zpool_id Linux 3.4 compat, d_make_root() replaces d_alloc_root() 2012-06-11 10:04:49 -07:00
zpool_layout Linux 3.4 compat, d_make_root() replaces d_alloc_root() 2012-06-11 10:04:49 -07:00
ztest Linux 3.4 compat, d_make_root() replaces d_alloc_root() 2012-06-11 10:04:49 -07:00
zvol_id Workaround for failing zvol_id 2012-06-13 11:25:17 -07:00
Makefile.am Add vdev_id for JBOD-friendly udev aliases 2012-06-01 08:55:14 -07:00
Makefile.in Linux 3.4 compat, d_make_root() replaces d_alloc_root() 2012-06-11 10:04:49 -07:00