Agreed that it is unexpected. Does your script call zfs destroy -R on the snapshots? If so, is it possible that the children filesystems are consuming some space? This kind of space usage is not reflected by the USED size for the parent filesystem or snapshot.
# zfs list -t all -r -o name,used,refer,origin testpool NAME USED REFER ORIGIN testpool 1021M 23K - testpool/b 1008M 1008M testpool/testfs@snap1 testpool/testfs 28.5K 28.5K - testpool/testfs@snap1 0 28.5K - # zfs destroy -R testpool/testfs@snap1 # zfs list -t all -r -o name,used,refer,origin testpool NAME USED REFER ORIGIN testpool 13.6M 23K - testpool/testfs 28.5K 28.5K - On Fri, May 13, 2016 at 7:36 AM, Peter Tribble <peter.trib...@gmail.com> wrote: > > > On Thu, May 12, 2016 at 5:33 PM, Steven Burgess < > steven.a.burg...@gmail.com> wrote: > >> Snapshots take up some space, but 2M per sound much higher than expected. >> I ran an experiment on an otherwise idle machine: >> >> zpool get -Hp -o value free testpool >> >> 7362543104 >> >> zfs get -rHp -o value -t snapshot name testpool/testfs | wc -l >> >> 5000 >> >> Zfs destroy testpool/testfs@first%last >> >> zpool get -Hp -o value free testpool >> >> 7351909376 >> >> So by destroying those 5000 snapshots we freed up 10 MiB, that's 2126 >> bytes (0.002 MiB) per snapshot. >> > > Which is closer to what I expected. > > >> How did you confirm that the snapshots took no space? If files are shared >> between snapshots, it is possible to free space by destroying a large set >> of snapshots where each snapshots used is 0. You can use zfs destroy -nv to >> see this kind of space usage. >> > > This is all after the fact. But beforehand zfs list said: > > NAME USED AVAIL REFER MOUNTPOINT > tank/a 300M 169G 300M /a > > so USED and REFER were identical - there's no evidence of any significant > space used by snapshots > there. Which matches what I would expect based on usage. > > I have 2 similar machines, in both cases I removed 35k snapshots; in both > cases I came back to find > that I had another 70G free in the pool. And yes, I can match up the steps > on the free space graph > with when the snapshots were destroyed. > > This isn't really a problem, I was just curious because the result was > unexpected. > > >> On Thu, May 12, 2016 at 11:14 AM, Dan McDonald <dan...@omniti.com> wrote: >> >>> >>> > On May 12, 2016, at 7:01 AM, Peter Tribble <peter.trib...@gmail.com> >>> wrote: >>> > >>> > Does anyone know what the overhead of a zfs snapshot is? >>> > >>> > I'm not talking about the data, I'm talking about whatever space >>> > zfs needs to allocate internally for housekeeping. >>> > >>> > A quick estimate indicates something around 2M of overhead. >>> > >>> > (I've just deleted ~35k snapshots on a system, each taking no space. >>> > I was a little surprised - although pleased - to get ~70G of space back >>> > in the pool.) >>> >>> I'd highly recommend asking this question and sharing your observations >>> with the ZFS developer's list. In fact, why don't I just do that for you... >>> >>> Dan >>> >> >> > > > -- > -Peter Tribble > http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/ > ------------------------------------------- openzfs-developer Archives: https://www.listbox.com/member/archive/274414/=now RSS Feed: https://www.listbox.com/member/archive/rss/274414/28015062-cce53afa Modify Your Subscription: https://www.listbox.com/member/?member_id=28015062&id_secret=28015062-f966d51c Powered by Listbox: http://www.listbox.com