qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 0/4] The intro of QEMU block I/O throttling


From: Zhi Yong Wu
Subject: Re: [Qemu-devel] [PATCH v6 0/4] The intro of QEMU block I/O throttling
Date: Thu, 1 Sep 2011 11:00:07 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Aug 31, 2011 at 06:31:44PM +0800, Zhi Yong Wu wrote:
>Return-Path: <address@hidden>
>Received: from imap.linux.ibm.com ([unix socket])  by imap.linux.ibm.com
> (Cyrus v2.3.16-Fedora-RPM-2.3.16-6.el6_1.2) with LMTPA;  Wed, 31 Aug 2011
> 07:10:59 -0400
>X-Sieve: CMU Sieve 2.3
>Received: from localhost (localhost [127.0.0.1]) by imap.linux.ibm.com
> (Postfix) with ESMTP id 458A11600040 for <address@hidden>; Wed,
> 31 Aug 2011 07:10:59 -0400 (EDT)
>X-Virus-Scanned: amavisd-new at linux.ibm.com
>X-Spam-Flag: NO
>X-Spam-Score: -1.578
>X-Spam-Level:
>X-Spam-Status: No, score=-1.578 tagged_above=-9999 required=5
> tests=[ALL_TRUSTED=-1, AWL=-0.037, RP_MATCHES_RCVD=-0.541]
> autolearn=disabled
>Received: from imap.linux.ibm.com ([127.0.0.1]) by localhost
> (maier.raleigh.ibm.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id
> IY4ziHLPdPGE for <address@hidden>; Wed, 31 Aug 2011 07:10:43
> -0400 (EDT)
>Received: from smtp.linux.ibm.com (smtp.linux.ibm.com [9.26.4.197]) by
> imap.linux.ibm.com (Postfix) with ESMTP id 7C6F11600046 for
> <address@hidden>; Wed, 31 Aug 2011 06:32:56 -0400 (EDT)
>Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com
> [9.17.195.107]) by smtp.linux.ibm.com (Postfix) with ESMTP id 2C79EC7A04
> for <address@hidden>; Wed, 31 Aug 2011 06:32:56 -0400 (EDT)
>Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com
> [9.17.195.167]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0)
> with ESMTP id p7VAWtDc065946 for <address@hidden>; Wed, 31 Aug 2011
> 04:32:55 -0600
>Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by
> d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id
> p7VAWtL0020748 for <address@hidden>; Wed, 31 Aug 2011 04:32:55 -0600
>Received: from VMSDVM6.POK.IBM.COM (vmsdvm6.pok.ibm.com [9.57.5.25]) by
> d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id
> p7VAWskr020721 for <@vm-av.bld.relay.ibm.com:address@hidden>; Wed, 31
> Aug 2011 04:32:54 -0600
>Received: by VMSDVM6.POK.IBM.COM (IBM VM SMTP Level 540) via spool with SMTP
> id 4823 ; Wed, 31 Aug 2011 06:32:38 EDT
>Received: by vmsdvm6.vnet.ibm.com (xagent2 6.3.1) via xagsmtp4 with spool id
> 0929 for address@hidden; Wed, 31 Aug 2011 06:32:38 -0400 (EDT)
>Received: from d03relay03.boulder.ibm.com [9.17.195.228] by
> VMSDVM6.POK.IBM.COM (IBM VM SMTP Level 540) via TCP with ESMTP ; Wed, 31
> Aug 2011 06:32:36 EDT
>Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com
> [9.17.195.170])       by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO
> v10.0) with ESMTP id p7VAWpoc158318;  Wed, 31 Aug 2011 04:32:52 -0600
>Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1])  by
> d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id
> p7V4Wp7A005389;       Tue, 30 Aug 2011 22:32:51 -0600
>Received: from f15.cn.ibm.com ([9.115.118.18]) by d03av04.boulder.ibm.com
> (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p7V4WmrS002404
> (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);   Tue,
> 30 Aug 2011 22:32:50 -0600
>Received: from f15 (localhost [127.0.0.1])     by f15.cn.ibm.com
> (8.14.4/8.14.4) with ESMTP id p7VAVvbC004033; Wed, 31 Aug 2011 18:31:58
> +0800
>Received: (from address@hidden)        by f15 (8.14.4/8.14.4/Submit) id
> p7VAVphk004032;       Wed, 31 Aug 2011 18:31:52 +0800
>From: Zhi Yong Wu <address@hidden>
>To: address@hidden
>Cc: address@hidden, address@hidden, address@hidden,
> address@hidden, address@hidden, address@hidden,
> address@hidden, address@hidden, Zhi Yong Wu <address@hidden>
>Subject: [PATCH v6 0/4] The intro of QEMU block I/O throttling
>Date: Wed, 31 Aug 2011 18:31:44 +0800
>Message-Id: <address@hidden>
>X-Mailer: git-send-email 1.7.6
>X-Xagent-From: address@hidden
>X-Xagent-To: address@hidden
>X-Xagent-Gateway: vmsdvm6.vnet.ibm.com (XAGENTU5 at VMSDVM6)
>
>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 V5:
>  Mainly fix the aio callback issue for block queue.
Sorry, thanks Ram Pai, some code changes based on his comments.
>
>Zhi Yong Wu (4):
>  block: add the command line support
>  block: add the block queue support
>  block: add block timer and block throttling algorithm
>  qmp/hmp: add block_set_io_throttle
>
> 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           |  324 +++++++++++++++++++++++++++++++++++++++++++++++++++--
> block.h           |    6 +-
> block/blk-queue.c |  226 +++++++++++++++++++++++++++++++++++++
> block/blk-queue.h |   63 ++++++++++
> 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, 837 insertions(+), 13 deletions(-)
> create mode 100644 block/blk-queue.c
> create mode 100644 block/blk-queue.h
>
>-- 
>1.7.6
>



reply via email to

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