[sheepdog] [PATCH 1/2] dog: add a new option for reducing identical snapshots
Liu Yuan
namei.unix at gmail.com
Thu Feb 12 08:49:00 CET 2015
On Thu, Feb 12, 2015 at 04:40:56PM +0900, Hitoshi Mitake wrote:
> At Thu, 12 Feb 2015 15:31:15 +0800,
> Liu Yuan wrote:
> >
> > On Thu, Feb 12, 2015 at 03:59:51PM +0900, Hitoshi Mitake wrote:
> > > At Thu, 12 Feb 2015 14:38:37 +0800,
> > > Liu Yuan wrote:
> > > >
> > > > On Mon, Feb 09, 2015 at 05:25:48PM +0900, Hitoshi Mitake wrote:
> > > > > Current "dog vdi snapshot" command creates a new snapshot
> > > > > unconditionally, even if a working VDI doesn't have its own
> > > > > objects. In such a case, the created snapshot is redundant because
> > > > > same VDI is already existing.
> > > >
> > > > What kind of use case will create two identical snapshots? This logic is simple
> > > > and code is clean, but I doubt if there is real users of this option.
> > >
> > > Generally speaking, taking snapshot periodically is an ordinal usecase
> > > of enterprise SAN. Of course sheepdog can support this use case. In a
> > > case of sheepdog, making cron job (e.g. daily) which invokes "dog vdi
> > > snapshot" simply enables it.
> > >
> > > But if a VDI doesn't have COWed objects, the snapshot will be
> > > redundant. So I want to add this option.
> >
> > Okay, your patch makes sense for periodic snapshot. But if dog have found
> > identical snapshots, it won't create a new one and return success to the caller.
> >
> > I assume the caller is some middleware, if there is no new vdi returned, will
> > this cause trouble for it? This means it will need to call 'vdi list' to check
> > if new vdi created or not?
>
> So I'm adding this feature with the new option. Existing semantics
> isn't affected. And if checking process (has_own_objects()) faces
> error, it is reported correctly to middleware.
>
> >
> > I'm not agasint this patch, but I have some questions. For identical snapshots,
> > the overhead is just an inode object created, no? Looks to me the overhead is
> > quite small and no need a special option to remove it.
>
> Taking snapshots of thousands of VDIs will consume thousands of VID,
> and create thousands * replication factor of inodes. I'm not sure the
> consumption of VID will become serious problem, but inodes will make
> replication time longer (e.g. 16:4 ec requires 20 inodes).
Yes, this is the point. Make sense to me. I have some comments to the code in
my last email. Could you submit a V2? BTW, it would be great if you can include
above rationale into the commit log.
Thanks
Yuan
More information about the sheepdog
mailing list