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.

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.

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
> 



-------------------------------------------
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

Reply via email to