qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
To: kwolf@redhat.com
Cc: zwu.kernel@gmail.com, ryanh@us.ibm.com,
	Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com
Subject: [Qemu-devel] [PATCH v11 0/4] The intro to QEMU block I/O throttling
Date: Wed,  2 Nov 2011 14:01:40 +0800	[thread overview]
Message-ID: <1320213705-8097-1-git-send-email-wuzhy@linux.vnet.ibm.com> (raw)

The main goal of the patch is to effectively cap the disk I/O speed or counts of one single VM.It is only one draft, so it unavoidably has some drawbacks, if you catch them, please let me know.

The patch will mainly introduce one block I/O throttling algorithm, one timer and one block queue for each I/O limits enabled drive.

When a block request is coming in, the throttling algorithm will check if its I/O rate or counts exceed the limits; if yes, then it will enqueue to the block queue; The timer will handle the I/O requests in it.

Some available features follow as below:
(1) global bps limit.
   -drive bps=xxx            in bytes/s
(2) only read bps limit
   -drive bps_rd=xxx         in bytes/s
(3) only write bps limit
   -drive bps_wr=xxx         in bytes/s
(4) global iops limit
   -drive iops=xxx           in ios/s
(5) only read iops limit
   -drive iops_rd=xxx        in ios/s
(6) only write iops limit
   -drive iops_wr=xxx        in ios/s
(7) the combination of some limits.
   -drive bps=xxx,iops=xxx

Known Limitations:
(1) #1 can not coexist with #2, #3
(2) #4 can not coexist with #5, #6

Changes since code V10:
    1.) Made some mininal changes based on stefan and Ryan's comments
    2.) Add one perf report for block I/O throttling

 v10 Greately simply the logic and rebase request queue to CoQueue based on Stefan's comments.

 v9 made a lot of changes based on kevin's comments.
    slice_time is dynamically adjusted based on wait_time.
    rebase the latest qemu upstream.

 v8: fix the build per patch based on stefan's comments.

 v7: Mainly simply the block queue.
     Adjust codes based on stefan's comments.

 v6: Mainly fix the aio callback issue for block queue.
     Adjust codes based on Ram Pai's comments.

 v5: add qmp/hmp support.
     Adjust the codes based on stefan's comments
     qmp/hmp: add block_set_io_throttle

 v4: fix memory leaking based on ryan's feedback.

 v3: Added the code for extending slice time, and modified the method to compute wait time for the timer.

 v2: The codes V2 for QEMU disk I/O limits.
     Modified the codes mainly based on stefan's comments.

 v1: Submit the codes for QEMU disk I/O limits.
     Only a code draft.


Zhi Yong Wu (4):
  block: add the blockio limits command line support
  block: add I/O throttling algorithm
  hmp/qmp: add block_set_io_throttle
  block: perf testing data based on block I/O throttling

 10mbps.dat            |  334 ++++++++++++++++++++++++++++++++++++++++++++++++
 1mbps.dat             |  341 +++++++++++++++++++++++++++++++++++++++++++++++++
 block.c               |  276 +++++++++++++++++++++++++++++++++++++++-
 block.h               |    5 +
 block_int.h           |   30 +++++
 blockdev.c            |  103 +++++++++++++++
 blockdev.h            |    2 +
 hmp-commands.hx       |   15 ++
 hmp.c                 |   10 ++
 qapi-schema.json      |   16 ++-
 qemu-config.c         |   24 ++++
 qemu-coroutine-lock.c |    8 +
 qemu-coroutine.h      |    6 +
 qemu-options.hx       |    1 +
 qerror.c              |    4 +
 qerror.h              |    3 +
 qmp-commands.hx       |   53 ++++++++-
 17 files changed, 1228 insertions(+), 3 deletions(-)
 create mode 100644 10mbps.dat
 create mode 100644 1mbps.dat

-- 
1.7.6

             reply	other threads:[~2011-11-02  6:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02  6:01 Zhi Yong Wu [this message]
2011-11-02  6:01 ` [Qemu-devel] [PATCH v11 1/4] block: add the blockio limits command line support Zhi Yong Wu
2011-11-02 11:32   ` Kevin Wolf
2011-11-03  3:11     ` Zhi Yong Wu
2011-11-02  6:01 ` [Qemu-devel] [PATCH v11 2/4] block: add I/O throttling algorithm Zhi Yong Wu
2011-11-02 11:51   ` Kevin Wolf
2011-11-03  3:18     ` Zhi Yong Wu
2011-11-03  8:03       ` Kevin Wolf
2011-11-03  8:03         ` Zhi Yong Wu
2011-11-02  6:01 ` [Qemu-devel] [PATCH v11 3/4] hmp/qmp: add block_set_io_throttle Zhi Yong Wu
2011-11-02  6:01 ` [Qemu-devel] [PATCH v11 4/4] block: perf testing data based on block I/O throttling Zhi Yong Wu
2011-11-02  6:01 ` [Qemu-devel] [PATCH v11 5/5] lsllsls Zhi Yong Wu
2011-11-02  6:09   ` Zhi Yong Wu

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=1320213705-8097-1-git-send-email-wuzhy@linux.vnet.ibm.com \
    --to=wuzhy@linux.vnet.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ryanh@us.ibm.com \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=zwu.kernel@gmail.com \
    /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).