From patchwork Tue Apr 12 20:59:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Silbe X-Patchwork-Id: 8815641 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0DF259F39A for ; Tue, 12 Apr 2016 21:00:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 393B62035D for ; Tue, 12 Apr 2016 21:00:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 38F7620361 for ; Tue, 12 Apr 2016 21:00:24 +0000 (UTC) Received: from localhost ([::1]:57465 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aq5Q7-0004SS-8d for patchwork-qemu-devel@patchwork.kernel.org; Tue, 12 Apr 2016 17:00:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aq5Pz-0004Pg-8R for qemu-devel@nongnu.org; Tue, 12 Apr 2016 17:00:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aq5Pw-0004Lp-0T for qemu-devel@nongnu.org; Tue, 12 Apr 2016 17:00:15 -0400 Received: from e06smtp09.uk.ibm.com ([195.75.94.105]:35740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aq5Pv-0004LP-Nz for qemu-devel@nongnu.org; Tue, 12 Apr 2016 17:00:11 -0400 Received: from localhost by e06smtp09.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 12 Apr 2016 22:00:09 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp09.uk.ibm.com (192.168.101.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 12 Apr 2016 22:00:00 +0100 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: silbe@linux.vnet.ibm.com X-IBM-RcptTo: qemu-devel@nongnu.org Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 04CEE17D805A for ; Tue, 12 Apr 2016 22:00:44 +0100 (BST) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u3CKxx3Z6095200 for ; Tue, 12 Apr 2016 21:00:00 GMT Received: from d06av07.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u3CKxxrr005002 for ; Tue, 12 Apr 2016 16:59:59 -0400 Received: from oc4731375738.ibm.com (sig-9-84-2-104.evts.de.ibm.com [9.84.2.104]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u3CKxxdM004997 (version=TLSv1/SSLv3 cipher=AES256-SHA256 bits=256 verify=NO); Tue, 12 Apr 2016 16:59:59 -0400 From: Sascha Silbe To: qemu-devel@nongnu.org, Markus Armbruster Date: Tue, 12 Apr 2016 22:59:56 +0200 Message-Id: <1460494796-12668-1-git-send-email-silbe@linux.vnet.ibm.com> X-Mailer: git-send-email 1.9.1 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16041221-0037-0000-0000-00000AAD146B X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 195.75.94.105 Subject: [Qemu-devel] [PATCH] qmp-commands.hx: document minimum speed for block jobs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The current rate limit implementation for block jobs is ineffective below a certain minimum rate. It will permit writes at least once per time slice. The resulting minimum write speed (assuming source and sink are fast enough in the first place) is high enough that it may surprise some users, so document it. Mention that this will be fixed in the future, otherwise some users might misguidedly rely on it or clamp their configuration settings to the documented value. Signed-off-by: Sascha Silbe --- Noticed this while figuring out why qemu-iotests #141 failed on one of my systems. I for one was quite surprised, so I went ahead and documented it. qmp-commands.hx | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index de896a5..e0e519a 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1107,7 +1107,10 @@ Arguments: obvious choice. Care should be taken when specifying the string, to specify a valid filename or protocol. (json-string, optional) (Since 2.1) -- "speed": the maximum speed, in bytes per second (json-int, optional) +- "speed": The maximum speed, in bytes per second. Note: In the current + implementation, at least 5MiB/s will be written, even if a lower + speed has been set. This will be fixed in the future. (json-int, + optional) - "on-error": the action to take on an error (default 'report'). 'stop' and 'enospc' can only be used if the block device supports io-status. (json-string, optional) (Since 2.1) @@ -1172,7 +1175,10 @@ Arguments: size of the smaller top, you can safely truncate it yourself once the commit operation successfully completes. (json-string) -- "speed": the maximum speed, in bytes per second (json-int, optional) +- "speed": The maximum speed, in bytes per second. Note: In the current + implementation, at least 5MiB/s will be written, even if a lower + speed has been set. This will be fixed in the future. (json-int, + optional) Example: @@ -1219,7 +1225,10 @@ Arguments: is "incremental", must NOT be present otherwise. - "mode": whether and how QEMU should create a new image (NewImageMode, optional, default 'absolute-paths') -- "speed": the maximum speed, in bytes per second (json-int, optional) +- "speed": The maximum speed, in bytes per second. Note: The current + implementation will write at a minimum speed that depends on device + and format, even if a lower speed is configured. This will be fixed + in the future. (json-int, optional) - "on-source-error": the action to take on an error on the source, default 'report'. 'stop' and 'enospc' can only be used if the block device supports io-status. @@ -1260,7 +1269,10 @@ Arguments: possibilities include "full" for all the disk, "top" for only the sectors allocated in the topmost image, or "none" to only replicate new I/O (MirrorSyncMode). -- "speed": the maximum speed, in bytes per second (json-int, optional) +- "speed": The maximum speed, in bytes per second. Note: The current + implementation will write at a minimum speed that depends on device + and format, even if a lower speed is configured. This will be fixed + in the future. (json-int, optional) - "on-source-error": the action to take on an error on the source, default 'report'. 'stop' and 'enospc' can only be used if the block device supports io-status. @@ -1659,8 +1671,12 @@ Arguments: (json-string, optional) - "mode": how an image file should be created into the target file/device (NewImageMode, optional, default 'absolute-paths') -- "speed": maximum speed of the streaming job, in bytes per second - (json-int) +- "speed": The maximum speed, in bytes per second. Note: In the + current implementation, the buffer will be written at least + once per 100ms. So with the default buffer size of 10MiB, + at least 10MiB/s will be written, even if a lower speed is + configured. This will be fixed in the future. (json-int, + optional) - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional) - "buf-size": maximum amount of data in flight from source to target, in bytes (json-int, default 10M) @@ -1712,8 +1728,12 @@ Arguments: - "target": device name to mirror to (json-string) - "replaces": the block driver node name to replace when finished (json-string, optional) -- "speed": maximum speed of the streaming job, in bytes per second - (json-int) +- "speed": The maximum speed, in bytes per second. Note: In the + current implementation, the buffer will be written at least + once per 100ms. So with the default buffer size of 10MiB, + at least 10MiB/s will be written, even if a lower speed is + configured. This will be fixed in the future. (json-int, + optional) - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional) - "buf_size": maximum amount of data in flight from source to target, in bytes (json-int, default 10M)