btrbk
btrbk copied to clipboard
FAQ: Number of snapshots vs disk performance
I've read the btrbk FAQ but it didn't answer my only question. How many snapshots of a subvolume does BTRFS let the user create before disk performance begins to suffer?
Last time I looked into this, online sources were telling me to avoid creating more than 20 or so snapshots per subvolume to avoid degraded performance. Is that no longer the case?
Has anyone done some decent research / tests regarding this using a recent kernel?
That info is also missing from here:
https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Subvolumes
Which would seem like the place most likely to tell me this apart from the btrbk FAQ.
I think the correct answer is "it depends", and that's probably why you can't find reliable information on this.
What I can say is that my backup servers contain thousand-ish subvolumes, causing a couple of seconds mount time on a slow embedded device (>3000 subvolumes currently, not going to reboot it just to check right now ;-).
From my experience I would say:
- 100 subvolumes: no noticeable performance drop
- 1000 subvolumes: slight performance drop
- 10000 subvolumes: unknown, probably ok on a backup server, maybe not ok on a production server
Thanks for the useful feedback @digint !
I've heard ZFS performance starts to suffer around the 10000 snapshots mark. I've also heard bcachefs can handle millions of snapshots without any problems, which will be cool if true. I've not tried bcachefs yet.