]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r230397, r230438:
authormm <mm@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 20 Feb 2012 21:10:14 +0000 (21:10 +0000)
committermm <mm@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 20 Feb 2012 21:10:14 +0000 (21:10 +0000)
commit2e7ab50569118b1b0b7c5bb319070e98b1bfe3dd
tree35e6ab48ceac94ad45b387d7aa7402ea0043020a
parent211fe14722317b5c87456770b12d8291c94c6b79
MFC r230397, r230438:

MFC r230397 (pjd):
By default turn off prefetch when listing snapshots.
In my tests it makes listing snapshots 19% faster with cold cache and
47% faster with warm cache.

MFC r230438 (pjd):
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

git-svn-id: svn://svn.freebsd.org/base/stable/9@231946 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c
cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h
cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c