qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v10 0/3] The intro of QEMU block I/O throttling


From: Zhi Yong Wu
Subject: [Qemu-devel] [PATCH v10 0/3] The intro of QEMU block I/O throttling
Date: Tue, 1 Nov 2011 15:40:56 +0800

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 V9:
     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 (3):
  block: add the command line support
  block: add I/O throttling algorithm
  hmp/qmp: add block_set_io_throttle

 block.c               |  283 +++++++++++++++++++++++++++++++++++++++++++++++++
 block.h               |    5 +
 block_int.h           |   30 +++++
 blockdev.c            |   83 ++++++++++++++
 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 +++++++++-
 15 files changed, 541 insertions(+), 2 deletions(-)

-- 
1.7.6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]