Received: by 10.223.164.202 with SMTP id h10csp1220171wrb; Fri, 17 Nov 2017 16:31:05 -0800 (PST) X-Google-Smtp-Source: AGs4zMaiYoZPNCLWdQL/VI/3KwpGaGxYv50WxrX1o3+bphTXvcVL9agDi0j3GL1tc3lF1DjCFsbR X-Received: by 10.84.151.69 with SMTP id i63mr6733856pli.61.1510965065451; Fri, 17 Nov 2017 16:31:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510965065; cv=none; d=google.com; s=arc-20160816; b=0BgM5/dNe1P+4M04xU8WP+Luq7xWeRVpSk8XsSGqvV8VIunbY31/rqgdCtUndqC6F0 H70RGHK19NVGiqLcf0ue452+X6k1AXVeAjnByMo6afDunWHzS/DZtEBz96nXHSRjIQtP D9z2pG6o4BVYH9JQ/BzsKa4oB35j2RhJ3zeMfiqaU47cBbLPolxoBUWtBcdZhzm82RlY NrqGSu5r0s8OIw4lfcsGsaFmRk1ds4HgfTxiTU9qySagBQ+/w/LA2giZv0FrhO8aF02+ LOFgdRsPlMfLNXIfp4YNvhXIyb+dKiyzJPWzBIg19orh+Z5u/kbGdPb57XcGO7kKvIV1 ytdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:arc-authentication-results; bh=7pGpSFADTnwwYVhF+ZoEx1ytWbQjL1/qpAiPib+SxN8=; b=YTdxIFj//FJAud1QyeVxreJ8gTxk+gmRoPPmLHnledfyd506zHM4lF2eDfplmRPcfb /c4dv6d7Sf/qSjqLa3wcZSK2zUc2+qCUyJBXCOtx5iOZdy6bbczlqP7szd/E5Iw5bUS2 L6py2SlxHLlEyYXpQPQEux8DBk4QhskeYjSaQfqIfYXWs4wN4jY7leHZPhhLb2ZbXk8H I3BUpZ9iLB0bLmOSNPcxI/pKCgfC9Xsnai+Y/TUPhWmL+Pkdu7kGG/ZYfi3HFUiLzHUJ +hZJAE1dieru9LHgLEUbLovH2tePIosBxt2r829k+Mn+jo+vLd4IPWJr1Jpg3rKfQvAp nm7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r63si3693237plb.638.2017.11.17.16.30.52; Fri, 17 Nov 2017 16:31:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757915AbdKQT0g (ORCPT + 93 others); Fri, 17 Nov 2017 14:26:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:53308 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757699AbdKQT0Q (ORCPT ); Fri, 17 Nov 2017 14:26:16 -0500 Received: from kernel.org (unknown [199.201.64.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AEBAB20C09; Fri, 17 Nov 2017 19:26:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AEBAB20C09 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=shli@kernel.org Date: Fri, 17 Nov 2017 11:26:14 -0800 From: Shaohua Li To: Khazhismel Kumykov Cc: axobe@kernel.dk, shli@fb.com, vgoyal@redhat.com, tj@kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Subject: Re: [RFC PATCH] blk-throttle: add burst allowance. Message-ID: <20171117192614.4knf72v26iir6tpi@kernel.org> References: <20171114231022.42961-1-khazhy@google.com> <20171116165033.4noofd6gkaj6x3yl@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 16, 2017 at 08:25:58PM -0800, Khazhismel Kumykov wrote: > On Thu, Nov 16, 2017 at 8:50 AM, Shaohua Li wrote: > > On Tue, Nov 14, 2017 at 03:10:22PM -0800, Khazhismel Kumykov wrote: > >> Allows configuration additional bytes or ios before a throttle is > >> triggered. > >> > >> This allows implementation of a bucket style rate-limit/throttle on a > >> block device. Previously, bursting to a device was limited to allowance > >> granted in a single throtl_slice (similar to a bucket with limit N and > >> refill rate N/slice). > >> > >> Additional parameters bytes/io_burst_conf defined for tg, which define a > >> number of bytes/ios that must be depleted before throttling happens. A > >> tg that does not deplete this allowance functions as though it has no > >> configured limits. tgs earn additional allowance at rate defined by > >> bps/iops for the tg. Once a tg has *_disp > *_burst_conf, throttling > >> kicks in. If a tg is idle for a while, it will again have some burst > >> allowance before it gets throttled again. > >> > >> slice_end for a tg is extended until io_disp/byte_disp would fall to 0, > >> when all "used" burst allowance would be earned back. trim_slice still > >> does progress slice_start as before and decrements *_disp as before, and > >> tgs continue to get bytes/ios in throtl_slice intervals. > > > > Can you describe why we need this? It would be great if you can describe the > > usage model and an example. Does this work for io.low/io.max or both? > > > > Thanks, > > Shaohua > > > > Use case that brought this up was configuring limits for a remote > shared device. Bursting beyond io.max is desired but only for so much > before the limit kicks in, afterwards with sustained usage throughput > is capped. (This proactively avoids remote-side limits). In that case > one would configure in a root container io.max + io.burst, and > configure low/other limits on descendants sharing the resource on the > same node. > > With this patch, so long as tg has not dispatched more than the burst, > no limit is applied at all by that tg, including limit imposed by > io.low in tg_iops_limit, etc. I'd appreciate if you can give more details about the 'why'. 'configuring limits for a remote shared device' doesn't justify the change. From 1584308119302776582@xxx Fri Nov 17 10:19:22 +0000 2017 X-GM-THRID: 1584087818449083473 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread