Re: Snapshot listing speedup.

2012-01-23 Thread Fabian Keil
Pawel Jakub Dawidek  wrote:

> If you have many snapshots and you were complaining that listing them
> takes a lot of time, you may find the commit below useful.

Indeed.
 
> 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).

After adjusting my backup script, I can confirm that gathering
the available snapshots is more than 200 times faster now.

Previously figuring out what to send frequently took more
time than actually sending the data.

Thanks a lot.

Fabian


signature.asc
Description: PGP signature


Re: Snapshot listing speedup.

2012-01-22 Thread Yuri Pankov
On Sun, Jan 22, 2012 at 12:23:22PM +0100, Pawel Jakub Dawidek wrote:
> 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).
[...]

Thanks Pawel, this looks extremely useful.

A bit of off-topic - are you planning to submit these changes to
illumos?


Yuri
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Snapshot listing speedup.

2012-01-22 Thread Freddie Cash
On Jan 22, 2012 3:26 AM, "Pawel Jakub Dawidek"  wrote:
>
> 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).

Would this have any effect on the speed of an 'ls' in the .zfs/snapshot/
directory? I'm guessing not, since that would have more to do with generic
directory listings and general slowness in 'ls'. But one can dream. :)
Afterall, the 'ls' *is* just querying the name and not all of the other ZFS
properties. :D

We do most of our snapshot accesses and listing via the .zfs/snapshot/
directory, which can take several seconds before the list starts to appear
when there's a couple of hundred snapshots there.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Snapshot listing speedup.

2012-01-22 Thread Pawel Jakub Dawidek
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 +, 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


pgpCh8Ntx3o73.pgp
Description: PGP signature