From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhiou-0008Ub-SJ for qemu-devel@nongnu.org; Wed, 07 Sep 2016 15:47:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhioq-0000Rv-LQ for qemu-devel@nongnu.org; Wed, 07 Sep 2016 15:47:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhioq-0000Rl-FK for qemu-devel@nongnu.org; Wed, 07 Sep 2016 15:47:36 -0400 Date: Wed, 7 Sep 2016 20:47:32 +0100 From: "Richard W.M. Jones" Message-ID: <20160907194732.GJ26315@redhat.com> References: <20160907193638.GB19639@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160907193638.GB19639@stefanha-x1.localdomain> Subject: Re: [Qemu-devel] virtio ssd caching List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: "Aarian P. Aleahmad" , qemu-devel@nongnu.org, kvm@vger.kernel.org On Wed, Sep 07, 2016 at 03:36:38PM -0400, Stefan Hajnoczi wrote: > On Tue, Sep 06, 2016 at 12:44:39PM +0430, Aarian P. Aleahmad wrote: > > I am looking for a solution to cache a VM on a SSD without the guest > > knowing about it. We can do it by caching the disk on which the VM's disk > > is lcoated with a SSD or we can do it through the hypervisor (i.e. Qemu, > > KVM, etc.). > > > > I was thinking about passing an ssd device to the hypervisor as a cache > > disk (e.g. passing /dev/sdb to the hypervisor) or making a new virtual disk > > image and storing it on a SSD and passing the SSD located vDisk to the > > hypervisor as a cache. > > > > Thus, I would like to know whether is it possible or not, and if not, if I > > wish to implement such a thing, what should I do and whether is there any > > reusable code to do so or not? > > QEMU itself doesn't offset tiering/caching but you can use the host > kernel's bcache or dm-cache features to achieve this. > > I haven't tried them myself so I can't give exact command-lines. > Richard Jones posted a tutorial in 2014: > https://rwmj.wordpress.com/2014/05/22/using-lvms-new-cache-feature/ I sure hope it works better today than it did back in 2014 :-( Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html