From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4Wjh-0004RS-Pp for qemu-devel@nongnu.org; Tue, 08 Jul 2014 10:51:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4Wjd-0002LA-3I for qemu-devel@nongnu.org; Tue, 08 Jul 2014 10:51:13 -0400 Received: from mx3-phx2.redhat.com ([209.132.183.24]:49257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4Wjc-0002KM-RV for qemu-devel@nongnu.org; Tue, 08 Jul 2014 10:51:09 -0400 Date: Tue, 8 Jul 2014 10:51:06 -0400 (EDT) From: Francesco Romani Message-ID: <1343598982.3800316.1404831066511.JavaMail.zimbra@redhat.com> In-Reply-To: <1404830964-10733-1-git-send-email-fromani@redhat.com> References: <1404830964-10733-1-git-send-email-fromani@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [RFC] add watermark reporting for block devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, mdroth@linux.vnet.ibm.com, stefanha@redhat.com, lcapitulino@redhat.com Sorry, this is actually an RFC; patch was posted separately. ----- Original Message ----- > From: "Francesco Romani" > To: qemu-devel@nongnu.org > Cc: kwolf@redhat.com, stefanha@redhat.com, lcapitulino@redhat.com, mdroth@linux.vnet.ibm.com, "Francesco Romani" > > Sent: Tuesday, July 8, 2014 4:49:23 PM > Subject: [PATCH] add watermark reporting for block devices > > Hello everyone > > I'm one of the oVirt developers (http://www.ovirt.org); > oVirt is a virtualization management application built > around qemu/kvm, so it is nice to get in touch :) > > We have begun a big scalability improvement effort, aiming to > support without problems hundreds of VMs per host, with plans > to support thousands in a not so distant future. > In doing so, we are reviewing our usage flows. > > One of them is thin-provisioned storage, which is used > quite extensively, with block devices (ISCSI for example) > and COW images. > When using thin provisioning, oVirt tries hard to hide this > fact from the guest OS, and to do so watches closely > the usage of the device, and resize it when its usage exceeds > a configured threshold (the "high water mark"), in order > to avoid the guest OS to get paused for space exhausted. > > To do the watching, we poll he devices using libvirt > (virDomainGetBlockInfo), which in turn uses query-blockstats. > This is suboptimal with just one VM, but with hundereds of them, > let alone thousands, it doesn't scale and it is quite a resource > hog. > > Would be great to have this watermark concept supported into qemu, > with a new event to be raised when the limit is crossed. > > To track this RFE I filed https://bugs.launchpad.net/qemu/+bug/1338957 > > Moreover, I had the chance to take a look at the QEMU sources > and come up with this tentative patch which I'd also like > to submit. > > Comments and thoughts very welcome! > > Thanks and best regards, > > Francesco Romani (1): > block: add watermark event > > block.c | 56 > +++++++++++++++++++++++++++++++++++++++++++++++ > blockdev.c | 21 ++++++++++++++++++ > include/block/block.h | 2 ++ > include/block/block_int.h | 3 +++ > qapi/block-core.json | 33 ++++++++++++++++++++++++++++ > qmp-commands.hx | 24 ++++++++++++++++++++ > 6 files changed, 139 insertions(+) > > -- > 1.9.3 > > -- Francesco Romani RedHat Engineering Virtualization R & D Phone: 8261328 IRC: fromani