Joep Vesseur wrote:
I was wondering why "zfs destroy -r" is so excruciatingly slow compared to
parallel destroys.

This issue is bug # 6631178.

The problem is that "zfs destroy -r <filesystem>" destroys each filesystem and snapshot individually, and each one must wait for a txg to sync (0.1 - 10 seconds). (Note that "zfs destroy -r <snapshot>" does not suffer from this; it does all its work in one txg.)

If you issue multiple "zfs destroy" commands in parallel, many of them will end up waiting for the same txg to finish, so many fewer txgs must pass to complete all the destroys.

In the most general case, this problem is nontrivial due to the error and depencency handling -- we need to collect error values from each individual destroy. However, there is much improvement that can be made for the common cases.

--matt
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to