[Sheepdog] [PATCH] sheep: disable object cache by default

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Wed May 9 10:25:23 CEST 2012


At Wed, 09 May 2012 15:21:49 +0800,
Liu Yuan wrote:
> 
> On 05/09/2012 01:40 AM, MORITA Kazutaka wrote:
> 
> > I know that the object cache works well if we don't mix writeback and
> > writethrough requests.  But the default cache modes of qemu and
> > qemu-img are different, so, IMHO, the object cache really should
> > handle the case.
> > 
> 
> 
> I still haven't yet been convinced to add this extra option. The real
> culprit is qemu-img, not object cache.

Are you saying that qemu-img should use cache=writethrough by default?
I think it's not acceptable for qemu community.

> 
> > If you really don't want to disable the feature by default, how about
> > just adding an option to disable the object cache?  If we can disable
> > it with a sheep command line option, it's okay, at least to me.
> 
> 
> I think adding an extra option doesn't make sense, because:
> 
> 0) QEMU disable object cache as default. This is already an efficient
> means to disable object cache.
> 
> 1) We already wrote a document to direct users how to use qemu-img
> correctly. If any casual user tries to misuse qemu-img, I don't think he
> would be aware of an option to disable object cache. So if he knows of
> object cache, he is supposed to handle it himself by help message and
> documentation and even if any problem, he could go ask the list for the
> help.
> 
> 2) Since we already have 'collie vdi clone and snapshot' utility, I'd
> suggest a new tool called 'collie vdi convert' to do the job of
> 'qemu-img convert' correctly as default and changes our README and
> documentation to use collie as default. I think this could exclude those
> casual users.


So 'collie vdi convert' doesn't use the write cache by default?  I
disagree it.  It makes sense to convert image with a writeback mode by
default for any users because we never use the image in the conversion
process.

It's a bug that the sheepdog write cache doesn't allow both writeback
and writethrough requests to the same image.  We should provide a way
to disable it until it is fixed.

What's the problem to you to introduce another option to disable the
object cache?  It will really helpful for users who don't like the
current cache semantics; it doesn't replicate data at all until the
data is flushed.

Kazutaka



More information about the sheepdog mailing list