-
Notifications
You must be signed in to change notification settings - Fork 105
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
perf(zfs): optimise pool listing for pools with many datasets #440
Conversation
310d0d7
to
b93ba8d
Compare
Requires #443 |
1 similar comment
Requires #443 |
@niladrih should I rebase? |
Yes, you'd have to rebase. But you might want to hold on to this for now. I'll raise a PR to upgrade the Go version. You can rebase then.. |
@niladrih thanks, let me know when that's ready. |
@lowjoel -- Now would be a good time to rebase your PR. |
Restricting the `zfs list` command to depth 1 saves a lot of time for pools with many datasets/zvols. In my case, before: ``` $ time zfs list -s name -o name,guid,available -H -p >/dev/null real 0m3.853s user 0m0.171s sys 0m3.539s ``` After: ``` $ time zfs list -d 1 -s name -o name,guid,available -H -p >/dev/null real 0m0.027s user 0m0.002s sys 0m0.026s ``` Signed-off-by: Joel Low <joel@joelsplace.sg>
@niladrih done, let's see the actions go through! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
@lowjoel does this issue seem relevant here openzfs/zfs#5594? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The behaviour described in the issue, i.e. |
Seems ok to me... |
Pull Request template
Please, go through these steps before you submit a PR.
Why is this PR required? What issue does it fix?:
Restricting the
zfs list
command to depth 1 saves a lot of time for pools with many datasets/zvols.In my case, before:
After:
What this PR does?:
This adds the
-d 1
argument to ListZFSPool.Does this PR require any upgrade changes?:
No, this change should be backward compatible.
If the changes in this PR are manually verified, list down the scenarios covered::
Any additional information for your reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs