zfs list slow

Tim Gustafson tjg at soe.ucsc.edu
Fri Dec 7 18:47:00 UTC 2012


We're running zpool version 28, and zfs version 5, on a FreeBSD
9.0-RELEASE-p4 box.

I'm trying to get a list of all snapshots in my zpool, like this:

/sbin/zfs list -H -r -t snapshot -o name -s name tank

We have about 2,000 file systems, and each of those has perhaps a
dozen snapshots.  This command currently takes about 5 minutes to run
the first time.  If you run it again immediately, it goes much quicker
- perhaps a few seconds.  But if you change any of the zpool
configuration (like creating a new snapshot, or a new file system),
the command takes about 5 minutes to run again.

Is there any way to speed up the listing of all local snapshots?

-- 

Tim Gustafson
tjg at soe.ucsc.edu
831-459-5354
Baskin Engineering, Room 313A


More information about the freebsd-fs mailing list