Received: from eggs.gnu.org ([2001:4830:134:3::10]:40331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur3yP-0000Wm-Vc for qemu-devel@nongnu.org; Mon, 24 Jun 2013 06:26:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ur3yO-0008Sd-2E for qemu-devel@nongnu.org; Mon, 24 Jun 2013 06:26:13 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:33397) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur3yN-0008SB-SF for qemu-devel@nongnu.org; Mon, 24 Jun 2013 06:26:11 -0400 Date: Mon, 24 Jun 2013 11:25:57 +0100 From: Alex Bligh Message-ID: In-Reply-To: <20130624093135.GC19900@stefanha-thinkpad.redhat.com> References: <7029962A8C6EFDBC98B51E44@nimrod.local> <20130411092548.GE8904@stefanha-thinkpad.redhat.com> <20130620094618.GC15672@stefanha-thinkpad.redhat.com> <51C46EAF.40705@gmail.com> <20130624093135.GC19900@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: [Qemu-devel] Adding a persistent writeback cache to qemu Reply-To: Alex Bligh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , Liu Yuan Cc: josh.durgin@inktank.com, Sage Weil , Alex Bligh , qemu-devel@nongnu.org Stefan, --On 24 June 2013 11:31:35 +0200 Stefan Hajnoczi wrote: > It sounds like the cache is in the sheep daemon and therefore has a > global view of all volumes being accessed from this host. That way it > can do things like share the cached snapshot data between volumes. Yes, that's potentially interesting. I think you'd only need to share data for read-only objects. Read caching (at least of read only objects) could also persist beyond the life of one qemu process. So stopping qemu and restarting it could be done with a hot cache. However, you can't do that for writeable objects, as your write back cache needs to be fully written out before another qemu process can be launched referencing the same object, and moreover writeable objects are not in general shared between multiple processes anyway (if we ignore corner cases like OCFS2 on RBD). I had assumed (because of some earlier work I did on a different distributed storage project) that the main advantage would be the write-back caching rather than the read caching; that might be untrue with multiple guests running the same image. > This is what I was pointing out about putting the cache in QEMU - you > only know about this QEMU process, not all volumes being accessed from > this host. > > Even if Ceph and Sheepdog don't share code, it sounds like they have a > lot in common and it's worth looking at the Sheepdog cache before adding > one to Ceph. One problem there is Ceph is in C++, Sheepdog is in C. Another is that sheepdog has a daemon running on the client which can keep state etc. as qemu comes and goes. Ceph just has a library. -- Alex Bligh