If you have many snapshots and you were complaining that listing them takes a lot of time, you may find the commit below useful. It only works if your listing is limited to snapshot names and you want to sort also by snapshot name (by default snapshots are sorted by creation time). On Sat, Jan 21, 2012 at 09:12:53PM +0000, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Sat Jan 21 21:12:53 2012 > New Revision: 230438 > URL: http://svn.freebsd.org/changeset/base/230438 > > Log: > 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 -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:23 UTC