Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751133AbcCAFUB (ORCPT ); Tue, 1 Mar 2016 00:20:01 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:52008 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbcCAFT7 (ORCPT ); Tue, 1 Mar 2016 00:19:59 -0500 Date: Mon, 29 Feb 2016 21:19:42 -0800 From: Shaohua Li To: Pavel Machek CC: , , , , Vivek Goyal , "jmoyer @ redhat . com" , Subject: Re: [PATCH V2 00/13] block-throttle: proportional throttle Message-ID: <20160301051940.GA2656893@devbig084.prn1.facebook.com> References: <20160228150251.GC6989@atrey.karlin.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160228150251.GC6989@atrey.karlin.mff.cuni.cz> User-Agent: Mutt/1.5.20 (2009-12-10) X-Originating-IP: [192.168.52.123] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-03-01_04:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1812 Lines: 40 On Sun, Feb 28, 2016 at 04:02:51PM +0100, Pavel Machek wrote: > Hi! > > > The problem is we don't know the max bandwidth a disk can provide for a > > specific workload, which depends on the device and IO pattern. The estimated > > bandwidth by patch 1 will be always not accurate unless the disk is already in > > max bandwidth. To solve this issue, we always over estimate the bandwidth. Over > > esitmate bandwidth, workload dispatchs more IO, estimated bandwidth becomes > > higher, dispatches even more IO. The loop will run till we enter a stable > > state, in which the disk gets max bandwidth. The 'slightly adjust and run into > > stable state' is the core algorithm the patch series use. We also use it to > > detect inactive cgroup. > > Ok, so you want to reach a steady state, but what if workloads varies > a lot? > > Lets say random writes for ten minutes, then linear write. > > Will the linear write be severely throttled because of the previous > seeks? If the workload vary a lot, it's possible there is fairness issue or performance issue when the workload is changing. The fairness or performance issue will depend on the changing interval. If the changing interval is short, say, several milliseconds, the issue would be big. For the case above, the linear write will get throttled initially as previously estimated bandwidth is low. The workload will get less throttled soon as estimated bandwidth will get bigger. Within some time, the workload will enter stable state and get highest bandwidth. > Can a task get bigger bandwidth by doing some additional (useless) > work? > > Like "I do bigger reads in the random read phase, so that I'm not > throttled that badly when I do the linear read"? Yes, it's possible, but only at the stage approaching to stable state. Thanks, Shaohua