From: Stefan Hajnoczi <stefanha@redhat.com>
To: Francesco Romani <fromani@redhat.com>
Cc: kwolf@redhat.com, mdroth@linux.vnet.ibm.com,
qemu-devel@nongnu.org, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH v5] block: add event when disk usage exceeds threshold
Date: Tue, 13 Jan 2015 13:54:41 +0000 [thread overview]
Message-ID: <20150113135441.GD21941@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1421068273-692-1-git-send-email-fromani@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2155 bytes --]
On Mon, Jan 12, 2015 at 02:11:13PM +0100, Francesco Romani wrote:
> Managing applications, like oVirt (http://www.ovirt.org), make extensive
> use of thin-provisioned disk images.
> To let the guest run smoothly and be not unnecessarily paused, oVirt sets
> a disk usage threshold (so called 'high water mark') based on the occupation
> of the device, and automatically extends the image once the threshold
> is reached or exceeded.
>
> In order to detect the crossing of the threshold, oVirt has no choice but
> aggressively polling the QEMU monitor using the query-blockstats command.
> This lead to unnecessary system load, and is made even worse under scale:
> deployments with hundreds of VMs are no longer rare.
>
> To fix this, this patch adds:
> * A new monitor command `block-set-write-threshold', to set a mark for
> a given block device.
> * A new event `BLOCK_WRITE_THRESHOLD', to report if a block device
> usage exceeds the threshold.
> * A new `write_threshold' field into the `BlockDeviceInfo' structure,
> to report the configured threshold.
>
> This will allow the managing application to use smarter and more
> efficient monitoring, greatly reducing the need of polling.
>
> Signed-off-by: Francesco Romani <fromani@redhat.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> ---
> block/Makefile.objs | 1 +
> block/qapi.c | 3 +
> block/write-threshold.c | 125 ++++++++++++++++++++++++++++++++++++++++
> include/block/block_int.h | 4 ++
> include/block/write-threshold.h | 64 ++++++++++++++++++++
> qapi/block-core.json | 51 +++++++++++++++-
> qmp-commands.hx | 32 ++++++++++
> tests/Makefile | 3 +
> tests/test-write-threshold.c | 119 ++++++++++++++++++++++++++++++++++++++
> 9 files changed, 401 insertions(+), 1 deletion(-)
> create mode 100644 block/write-threshold.c
> create mode 100644 include/block/write-threshold.h
> create mode 100644 tests/test-write-threshold.c
Thanks, applied to my block branch:
https://github.com/stefanha/qemu/tree/block
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-01-13 13:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-12 13:11 [Qemu-devel] [PATCH v5] block: add event when disk usage exceeds threshold Francesco Romani
2015-01-13 13:54 ` Stefan Hajnoczi [this message]
2015-01-13 13:59 ` Francesco Romani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150113135441.GD21941@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=fromani@redhat.com \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).