qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/2] The intro for QEMU disk I/O limits
@ 2011-07-28 10:49 Zhi Yong Wu
  2011-07-28 10:49 ` [Qemu-devel] [PATCH v3 1/2] The command line support " Zhi Yong Wu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Zhi Yong Wu @ 2011-07-28 10:49 UTC (permalink / raw)
  To: qemu-devel
  Cc: kwolf, aliguori, stefanha, kvm, mtosatti, Zhi Yong Wu, zwu.kernel,
	ryanh, luowenj

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 periodically 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
(3) When bps/iops limits are specified to a small value such as 511 bytes/s, this VM will hang up. We are considering how to handle this senario.

Zhi Yong Wu (2):
  v3: Added the code for extending slice time, and modified the method to compute wait time for the timer.
  The command line support for QEMU disk I/O limits
  The implement of block queue, block timer, and I/O throttling
    algorithm
  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.

 Makefile.objs   |    2 +-
 block.c         |  302 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 block.h         |    1 -
 block_int.h     |   29 ++++++
 blockdev.c      |   22 ++++
 qemu-config.c   |   24 +++++
 qemu-option.c   |   17 +++
 qemu-option.h   |    1 +
 qemu-options.hx |    1 +
 9 files changed, 389 insertions(+), 10 deletions(-)

-- 
1.7.2.3

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-08-01  6:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-28 10:49 [Qemu-devel] [PATCH v3 0/2] The intro for QEMU disk I/O limits Zhi Yong Wu
2011-07-28 10:49 ` [Qemu-devel] [PATCH v3 1/2] The command line support " Zhi Yong Wu
2011-07-28 10:49 ` [Qemu-devel] [PATCH v3 2/2] The implement of block queue, block timer, and I/O throttling algorithm Zhi Yong Wu
2011-07-31 19:09 ` [Qemu-devel] [PATCH v3 0/2] The intro for QEMU disk I/O limits Ryan Harper
2011-08-01  6:37   ` Zhi Yong Wu

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).