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

Parallel pruning #935

Open
nijave opened this issue Jul 2, 2024 · 1 comment
Open

Parallel pruning #935

nijave opened this issue Jul 2, 2024 · 1 comment

Comments

@nijave
Copy link

nijave commented Jul 2, 2024

Has parallel pruning ever come up? It's significantly faster for me (almost the same amount of time to prune 100s of snapshots in parallel as it takes to prune a single snapshot)

Usually I do

zfs list -t snapshot -o name my_pool | grep <some criteria> | while read -r snap; do zfs destroy "$snap" & done

Batching might be a middle ground (a 10s or 100s at a time). This would greatly help when reducing retention rules

Looks like it took ~4-5 minutes to prune 1500 snapshots across 2 pools running all in parallel vs ~10 seconds a piece when running sanoid --snapshots-prune

@jimsalterjrs
Copy link
Owner

Has parallel pruning ever come up? It's significantly faster for me

Interesting! No, hadn't really considered it. I've had to delete thousands of unwanted snapshots from a system before but never tried massive parallelism; I would do your loop with ; done instead of & done.

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