Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up "zfs list" on systems with lots of fs / snapshots #10

Closed
kaazoo opened this issue Apr 15, 2013 · 1 comment
Closed

Speed up "zfs list" on systems with lots of fs / snapshots #10

kaazoo opened this issue Apr 15, 2013 · 1 comment

Comments

@kaazoo
Copy link

kaazoo commented Apr 15, 2013

getsnapshotsfordatasetandhost() in JNX/ZFS.pm calls "zfs list -t snapshot" which is slow on systems with lots of fs and snapshots.

To me it looks like the function only requires the name of the snapshots and not all their metadata. So instead "zfs list -t snapshot -o name -s name" should be used.

On a production system with 697 filesystems and 7322 snapshots I get the following run times:

time zfs list -t snapshot -o name -s name >/dev/null

real  0m19.904s
user  0m0.224s
sys   0m1.336s
time zfs list -t snapshot >/dev/null

real  2m16.485s
user  0m0.712s
sys   0m4.540s

See openzfs/zfs#450 for reference.

@jollyjinx
Copy link
Owner

Thanx for pointing this out ! It's fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants