From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, kvm@vger.kernel.org, mtosatti@redhat.com, Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>, pair@us.ibm.com, zwu.kernel@gmail.com, ryanh@us.ibm.com Subject: [PATCH v8 0/4] The intro of QEMU block I/O throttling Date: Thu, 8 Sep 2011 18:11:04 +0800 [thread overview] Message-ID: <1315476668-19812-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 (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. Changes since code V7: fix the build per patch based on stefan's comments. Zhi Yong Wu (4): block: add the command line support block: add the block queue support block: add block timer and throttling algorithm qmp/hmp: add block_set_io_throttle 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. Makefile.objs | 2 +- block.c | 344 +++++++++++++++++++++++++++++++++++++++++++++++++++-- block.h | 6 +- block/blk-queue.c | 201 +++++++++++++++++++++++++++++++ block/blk-queue.h | 59 +++++++++ block_int.h | 30 +++++ blockdev.c | 98 +++++++++++++++ blockdev.h | 2 + hmp-commands.hx | 15 +++ qemu-config.c | 24 ++++ qemu-options.hx | 1 + qerror.c | 4 + qerror.h | 3 + qmp-commands.hx | 52 ++++++++- 14 files changed, 825 insertions(+), 16 deletions(-) create mode 100644 block/blk-queue.c create mode 100644 block/blk-queue.h -- 1.7.6
WARNING: multiple messages have this Message-ID (diff)
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@linux.vnet.ibm.com, kvm@vger.kernel.org, mtosatti@redhat.com, Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>, pair@us.ibm.com, zwu.kernel@gmail.com, ryanh@us.ibm.com Subject: [Qemu-devel] [PATCH v8 0/4] The intro of QEMU block I/O throttling Date: Thu, 8 Sep 2011 18:11:04 +0800 [thread overview] Message-ID: <1315476668-19812-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 (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. Changes since code V7: fix the build per patch based on stefan's comments. Zhi Yong Wu (4): block: add the command line support block: add the block queue support block: add block timer and throttling algorithm qmp/hmp: add block_set_io_throttle 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. Makefile.objs | 2 +- block.c | 344 +++++++++++++++++++++++++++++++++++++++++++++++++++-- block.h | 6 +- block/blk-queue.c | 201 +++++++++++++++++++++++++++++++ block/blk-queue.h | 59 +++++++++ block_int.h | 30 +++++ blockdev.c | 98 +++++++++++++++ blockdev.h | 2 + hmp-commands.hx | 15 +++ qemu-config.c | 24 ++++ qemu-options.hx | 1 + qerror.c | 4 + qerror.h | 3 + qmp-commands.hx | 52 ++++++++- 14 files changed, 825 insertions(+), 16 deletions(-) create mode 100644 block/blk-queue.c create mode 100644 block/blk-queue.h -- 1.7.6
next reply other threads:[~2011-09-08 10:11 UTC|newest] Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-09-08 10:11 Zhi Yong Wu [this message] 2011-09-08 10:11 ` [Qemu-devel] [PATCH v8 0/4] The intro of QEMU block I/O throttling Zhi Yong Wu 2011-09-08 10:11 ` [PATCH v8 1/4] block: add the block queue support Zhi Yong Wu 2011-09-08 10:11 ` [Qemu-devel] " Zhi Yong Wu 2011-09-23 15:32 ` Kevin Wolf 2011-09-23 15:32 ` [Qemu-devel] " Kevin Wolf 2011-09-26 8:01 ` Zhi Yong Wu 2011-09-26 8:01 ` Zhi Yong Wu 2011-10-17 10:17 ` Kevin Wolf 2011-10-17 10:17 ` Kevin Wolf 2011-10-17 10:17 ` Paolo Bonzini 2011-10-18 7:00 ` Zhi Yong Wu 2011-10-18 7:00 ` Zhi Yong Wu 2011-10-18 8:07 ` Zhi Yong Wu 2011-10-18 8:07 ` [Qemu-devel] " Zhi Yong Wu 2011-10-18 8:36 ` Kevin Wolf 2011-10-18 8:36 ` Kevin Wolf 2011-10-18 9:29 ` Zhi Yong Wu 2011-10-18 9:29 ` Zhi Yong Wu 2011-10-18 9:56 ` Kevin Wolf 2011-10-18 9:56 ` Kevin Wolf 2011-10-18 13:29 ` Zhi Yong Wu 2011-10-18 13:29 ` Zhi Yong Wu 2011-09-08 10:11 ` [PATCH v8 2/4] block: add the command line support Zhi Yong Wu 2011-09-08 10:11 ` [Qemu-devel] " Zhi Yong Wu 2011-09-23 15:54 ` Kevin Wolf 2011-09-23 15:54 ` [Qemu-devel] " Kevin Wolf 2011-09-26 6:15 ` Zhi Yong Wu 2011-09-26 6:15 ` [Qemu-devel] " Zhi Yong Wu 2011-10-17 10:19 ` Kevin Wolf 2011-10-17 10:19 ` Kevin Wolf 2011-10-18 8:17 ` Zhi Yong Wu 2011-10-18 8:17 ` [Qemu-devel] " Zhi Yong Wu 2011-09-08 10:11 ` [PATCH v8 3/4] block: add block timer and throttling algorithm Zhi Yong Wu 2011-09-08 10:11 ` [Qemu-devel] " Zhi Yong Wu 2011-09-09 14:44 ` Marcelo Tosatti 2011-09-09 14:44 ` [Qemu-devel] " Marcelo Tosatti 2011-09-13 3:09 ` Zhi Yong Wu 2011-09-13 3:09 ` [Qemu-devel] " Zhi Yong Wu 2011-09-14 10:50 ` Marcelo Tosatti 2011-09-14 10:50 ` [Qemu-devel] " Marcelo Tosatti 2011-09-19 9:55 ` Zhi Yong Wu 2011-09-19 9:55 ` [Qemu-devel] " Zhi Yong Wu 2011-09-20 12:34 ` Marcelo Tosatti 2011-09-20 12:34 ` [Qemu-devel] " Marcelo Tosatti 2011-09-21 3:14 ` Zhi Yong Wu 2011-09-21 3:14 ` [Qemu-devel] " Zhi Yong Wu 2011-09-21 5:54 ` Zhi Yong Wu 2011-09-21 5:54 ` [Qemu-devel] " Zhi Yong Wu 2011-09-21 7:03 ` Zhi Yong Wu 2011-09-21 7:03 ` [Qemu-devel] " Zhi Yong Wu 2011-09-26 8:15 ` Zhi Yong Wu 2011-09-26 8:15 ` [Qemu-devel] " Zhi Yong Wu 2011-09-23 16:19 ` Kevin Wolf 2011-09-23 16:19 ` [Qemu-devel] " Kevin Wolf 2011-09-26 7:24 ` Zhi Yong Wu 2011-09-26 7:24 ` [Qemu-devel] " Zhi Yong Wu 2011-10-17 10:26 ` Kevin Wolf 2011-10-17 10:26 ` Kevin Wolf 2011-10-17 15:54 ` Stefan Hajnoczi 2011-10-17 15:54 ` Stefan Hajnoczi 2011-10-18 8:29 ` Zhi Yong Wu 2011-10-18 8:29 ` Zhi Yong Wu 2011-10-18 8:43 ` Zhi Yong Wu 2011-10-18 8:43 ` Zhi Yong Wu 2011-09-08 10:11 ` [PATCH v8 4/4] qmp/hmp: add block_set_io_throttle Zhi Yong Wu 2011-09-08 10:11 ` [Qemu-devel] " Zhi Yong Wu -- strict thread matches above, loose matches on Subject: below -- 2011-09-07 12:31 [PATCH v8 0/4] The intro of QEMU block I/O throttling 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=1315476668-19812-1-git-send-email-wuzhy@linux.vnet.ibm.com \ --to=wuzhy@linux.vnet.ibm.com \ --cc=aliguori@us.ibm.com \ --cc=kvm@vger.kernel.org \ --cc=kwolf@redhat.com \ --cc=mtosatti@redhat.com \ --cc=pair@us.ibm.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.