From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2994030AbcBTLCr (ORCPT ); Sat, 20 Feb 2016 06:02:47 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:34939 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2994005AbcBTLCj convert rfc822-to-8bit (ORCPT ); Sat, 20 Feb 2016 06:02:39 -0500 Subject: Re: [PATCH RFC 09/22] block, cfq: replace CFQ with the BFQ-v0 I/O scheduler Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=windows-1252 From: Paolo Valente In-Reply-To: <72E81252-203C-4EB7-8459-B9B7060029C6@linaro.org> Date: Sat, 20 Feb 2016 12:02:33 +0100 Cc: Jens Axboe , Fabio Checconi , Arianna Avanzini , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Ulf Hansson , Linus Walleij , broonie@kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <0B70B2C1-DF9B-4803-BDF1-F343A35249A8@linaro.org> References: <1454364778-25179-1-git-send-email-paolo.valente@linaro.org> <1454364778-25179-10-git-send-email-paolo.valente@linaro.org> <20160211222210.GC3741@mtj.duckdns.org> <8FDE2B10-9BD2-4741-917F-5A37A74E5B58@linaro.org> <20160217170206.GU3741@mtj.duckdns.org> <72E81252-203C-4EB7-8459-B9B7060029C6@linaro.org> To: Tejun Heo X-Mailer: Apple Mail (2.1878.6) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il giorno 20/feb/2016, alle ore 11:23, Paolo Valente ha scritto: > Hi > > > If both processes reach ~100MB/s during their service slot, then, with > both a budget- and time-based policy, we can meet the above bandwidth > requirements by just assigning 9 and 1 as weights to A and B, > respectively (the weight sum equals 10, thus A gets (9/10)*100 MB/s > and B gets (1/10)*100 MB/s). Things change considerably if, e.g., the > already penalized process B may get a lower throughput while it is > served. This may happen to B systematically, as a function of the > locality of its I/O pattern and of the characteristics of the > rotational or non-rotational device. To mention a very simple yet > still realistic scenario, it is enough that the storage resource is an > HDD, and that B alternatively reads a large file from the inner zones > and a large file from the outer zones of the HDD. For example, suppose > that, regardless of whether the policy is budget- or time-based, B > reaches a throughput equal to ~70MB/s during some budget/time slots, > and to ~100MB/s during other budget/time slots. On the other hand, A > always reaches ~100MB/s while it is served. > Just one note, in case it is not clear, about how the bandwidth provided to a process depends on the weights and the scheduler. With a budget-based scheduler, the bandwidth provided to a process with weight w is equal to: ( w/(sum of the weights of the processes doing I/O) ) * (total bandwidth) With a time-based scheduler, it is equal to: ( fraction of the time during which the process is in service ) * (bandwidth reached by the process while in service) = ( w/(sum of the weights of the processes doing I/O) ) * (bandwidth reached by the process while in service) Thanks, Paolo