Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755058AbcJEUgz (ORCPT ); Wed, 5 Oct 2016 16:36:55 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:56475 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751932AbcJEUgw (ORCPT ); Wed, 5 Oct 2016 16:36:52 -0400 Date: Wed, 5 Oct 2016 13:36:24 -0700 From: Shaohua Li To: Paolo Valente CC: Tejun Heo , Vivek Goyal , , , Jens Axboe , , , Mark Brown , Linus Walleij , Ulf Hansson Subject: Re: [PATCH V3 00/11] block-throttle: add .high limit Message-ID: <20161005203623.GA1754@anikkar-mbp.local.dhcp.thefacebook.com> References: <20161004185413.GF4205@htj.duckdns.org> <20161004191427.GG4205@htj.duckdns.org> <20161004202754.GJ4205@htj.duckdns.org> <257945FA-6789-4D80-8DA3-AC75640C71AE@unimore.it> <20161005144946.GA26977@htj.duckdns.org> <20161005183052.GA97491@anikkar-mbp.local.dhcp.thefacebook.com> <20161005190832.GA99272@anikkar-mbp.local.dhcp.thefacebook.com> <98C2E984-2CF4-41F7-8A7D-6569C45A627A@unimore.it> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <98C2E984-2CF4-41F7-8A7D-6569C45A627A@unimore.it> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [2620:10d:c090:180::b686] X-ClientProxiedBy: DM3PR14CA0046.namprd14.prod.outlook.com (10.166.156.142) To BY2PR15MB0408.namprd15.prod.outlook.com (10.163.109.26) X-MS-Office365-Filtering-Correlation-Id: 22169f8a-8b7c-41a1-4a73-08d3ed5f4d78 X-Microsoft-Exchange-Diagnostics: 1;BY2PR15MB0408;2:o10n7NNMQpPF3Tstq9QV4g247WA8YJONL/GxtHnohqSJX1uHpOr2C+sVZj2QkamTXhIy7ooqkQ85NHugb/x7Ybsu2UMnYUwtIg+4qu6Ns4Rh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jULNca94RZXKy18RJiinr+AAAePWkKKVDts6/05f/a3B5SbWm2T8PdIv0WwXa X-Microsoft-Exchange-Diagnostics: 1;BY2PR15MB0408;31:V/Hf78B8T3UDzWi7baCe4+ygk0W/L1jzjRWwhFCQNL9P+/uzonWMEwSRb+7pxqtJwC/qo1KD7+GRr4r71lyi0GyJIbpAGrS8zeKbRePOhjh3DzcOUB2hFa8QVK489D9CSbHDpk1hv2cdXZrsIDOmV7lNA09qi2OtPSffvnaQ4+pmiXLPVVD4bkHYsXJ7xXgvTd6zjnap0zuUK54l2OS8LRglGbLK4F96kfOBGY77AsGcTA2GkK+YpQ65CftBj2F3;20:MtssaOHQj7IgPYr+lfequzEf/3I79+QF771vd7QROuqCVId0Pw1RMWK3HvLfSr8ZGqLpXJphkIlWmuCtu/VQ4gOk+jnmtn9tVCdPRzSGIlOfDPVUfOz/Fh3phxTvSry3IK6eUEGjuXH/IF5sWSKgb9muFA4agHBP/cv8bGHwezg=;4:VgeCZueZ5AuockHh66dhxARBvtXNaXOkZQA2hCJMtEuFlgKakGYiYbc2PKiEmffOEpt7/3DL6OVudFADvF9Cca+cpyaZ/TQu4I0t9JFoO2F+PUA5HKfL0KJBaIU6V47reToettNCXF0ZooI0N3RYD1b64WUwjtrVO7Ltm5+F8NeFVHNnOf5i5gOP3dgnA7HF01/2QtoPVFEtj4sV0+BaZtanBhtlDewhLR0EnFxzrMKV+jwSqpxHGpSxyrnhyu0E2PxLJyiM6xaEjfsWdoqbljRkMMskhfRcbPZW+slRuDz0zT/vPyqpgQREnJRyjfd4M3uKIk/zw6a3DaMQUOfVrjFFPF+F3rychY6dIjGLuk/EcW4F3epoIpUDAc3LPTLAO/l6r8rq63y4QRtQt3Byv5ObpocNm5FvhCJs5gb55k4ZQOiAhT9VkWGbU1UNOMQTZzjRIJryMnDDekzBsBnASA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(10436049006162)(67672495146484); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046);SRVR:BY2PR15MB0408;BCL:0;PCL:0;RULEID:;SRVR:BY2PR15MB0408; X-Forefront-PRVS: 008663486A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(189002)(24454002)(199003)(68736007)(77096005)(15975445007)(19580395003)(19580405001)(47776003)(46406003)(97736004)(105586002)(106356001)(93886004)(1076002)(4326007)(4001350100001)(8676002)(189998001)(6666003)(110136003)(16799955002)(76176999)(50986999)(83506001)(5660300001)(54356999)(2950100002)(6916009)(9686002)(92566002)(7736002)(575784001)(86362001)(7846002)(98436002)(6116002)(305945005)(101416001)(586003)(33656002)(81166006)(81156014)(42186005)(50466002)(23726003)(97756001)(2906002)(18370500001)(142923001)(3826002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR15MB0408;H:anikkar-mbp.local.dhcp.thefacebook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR15MB0408;23:5Dcd8RU0VE2oPIqBuyHrUWhVZQw6Ih37e+dcdYXJG?= =?us-ascii?Q?gbwWq2lS6on49UXgyEXNN3RmSBMIz3comc6FX/yuVDfEV4aViR2mssj4zSuA?= =?us-ascii?Q?mBTQb5GQ09RlPMc0WqCLiMGfS8bNi1RVstYj1s/61mZa4751OiEkSwuBreXa?= =?us-ascii?Q?tbf/GU8id39eFBZU/e2tyo0k/nYKLN6/rU+7GHjPKWLmqbpvzMQyYv4OD8Rn?= =?us-ascii?Q?hpOWoDFybg5+wunag0ALaSpn0RsPzmVyk0wMqcGp7jryU8RjtPeT5IcCcEKr?= =?us-ascii?Q?FU9/zj9VCaJE/meO6oB13qn68l4BeQCVroAzVzRixdbOOF3RumA1qGK6S4th?= =?us-ascii?Q?S0w9uDM5b+/whcliWJRwmBM1BuvpcyODaaB/AECF0iNxyMderdvwMdw6h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Oe2BSBnDx3KFll3nU+VXatgKYwXbgTOQE14g?= =?us-ascii?Q?/QQLR8KDAPHdd4gnds6acJY3FQT7uMOnDr9UFWzoPoc?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR15MB0408;6:vPm0MDrHvkoiTGKyb1E2gi+2G0Ape1flUzEg+NFgZBh+CM/Oucrm6LmNX06T04cIAswqVGD6dYzEUkvpkanOfyxvY8WGqGDKP/EWg6hCwV9SHTXgDYdc0BmQLOWNb9UxsQ2rgtdcGe67NgbXOTXhvQdqXA/+maC2RRmc1EkZqhST0UK95cdiXlGoP6kwIfkRyBGBK5LYg4tGx9BPBqumOIsKHeatProcDZzgWe2VXQsEI+1bOrCg9D9Uj0nxq0TdTgI25+zd+zth7DWS9QqHE8azGBCLXKSLmR87C96YFX8=;5:GbhYsQFVTFmbwM3bhg8Gs1yNefYYAviIE7xd8bOUyTg12D+cc8qkQvyfhTCHh14e7GQb3/qxtt621G1DfOtE3ttsqJH/SkAktF7men4qsapYjoR+Rs32AKNmXEMZf2hc9mpNoTdtJM1sf8BAQpU31g==;24:1OEbHqfg7XkF/TAiRYnHce/QBRXBoj50tipptF9ZstaIk2+2LJv9cvOiyuk/HX+kYqhppdnUWcOSZI77mm/KBlYoM4lzkCS4wmAr7uNVEDc=;7:hkf0nl4JngbyX0Otofpks7bUDBjaRDZ3uO6S3qTV5iMmeqpmYVTc31pxON5dgbYRHhGE7KHQWi9z+mJX17X+tNbdSjCayH509yd4uspEJynVf9YkQt02GwbZPDmRlcI0CnI+UViK7CsEgWoSvYK7jEYJ5aqMLaNIORefnounkSs9fHpxEefiafbBh9Lo2j3/kS+aBBuHRzHdOM16txH9nVjzJs8YitA55z4sFK7vlH7cx55t9fAPxKXks8V4VIsqEbAhFX5TTkSC+XaH+9GBEDJ4RUlY3bA1Xnz6MC+o8UIaKNhHEtNcRMADvJ9NG0uK SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR15MB0408;20:BHqMjp69guSEGQq2ntKknrlt865dGq6oKmdsDN7AtyOhtOegAxK72TY+L/9v6imPxcE8jX/QRkLl8iVA8VvQxT5lh3DCHk18Vjsbi2XhuKDn0K7LYB9q/y6rSznH/sq8XB7f2XXdIhUUxH1C/qr7ttehIVuSwUgV5eW1b5sY0RU= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2016 20:36:34.7089 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR15MB0408 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-05_05:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4820 Lines: 121 On Wed, Oct 05, 2016 at 09:57:22PM +0200, Paolo Valente wrote: > > > Il giorno 05 ott 2016, alle ore 21:08, Shaohua Li ha scritto: > > > > On Wed, Oct 05, 2016 at 11:30:53AM -0700, Shaohua Li wrote: > >> On Wed, Oct 05, 2016 at 10:49:46AM -0400, Tejun Heo wrote: > >>> Hello, Paolo. > >>> > >>> On Wed, Oct 05, 2016 at 02:37:00PM +0200, Paolo Valente wrote: > >>>> In this respect, for your generic, unpredictable scenario to make > >>>> sense, there must exist at least one real system that meets the > >>>> requirements of such a scenario. Or, if such a real system does not > >>>> yet exist, it must be possible to emulate it. If it is impossible to > >>>> achieve this last goal either, then I miss the usefulness > >>>> of looking for solutions for such a scenario. > >>>> > >>>> That said, let's define the instance(s) of the scenario that you find > >>>> most representative, and let's test BFQ on it/them. Numbers will give > >>>> us the answers. For example, what about all or part of the following > >>>> groups: > >>>> . one cyclically doing random I/O for some second and then sequential I/O > >>>> for the next seconds > >>>> . one doing, say, quasi-sequential I/O in ON/OFF cycles > >>>> . one starting an application cyclically > >>>> . one playing back or streaming a movie > >>>> > >>>> For each group, we could then measure the time needed to complete each > >>>> phase of I/O in each cycle, plus the responsiveness in the group > >>>> starting an application, plus the frame drop in the group streaming > >>>> the movie. In addition, we can measure the bandwidth/iops enjoyed by > >>>> each group, plus, of course, the aggregate throughput of the whole > >>>> system. In particular we could compare results with throttling, BFQ, > >>>> and CFQ. > >>>> > >>>> Then we could write resulting numbers on the stone, and stick to them > >>>> until something proves them wrong. > >>>> > >>>> What do you (or others) think about it? > >>> > >>> That sounds great and yeah it's lame that we didn't start with that. > >>> Shaohua, would it be difficult to compare how bfq performs against > >>> blk-throttle? > >> > >> I had a test of BFQ. I'm using BFQ found at > >> https://urldefense.proofpoint.com/v2/url?u=http-3A__algogroup.unimore.it_people_paolo_disk-5Fsched_sources.php&d=DQIFAg&c=5VD0RTtNlTh3ycd41b3MUw&r=X13hAPkxmvBro1Ug8vcKHw&m=zB09S7v2QifXXTa6f2_r6YLjiXq3AwAi7sqO4o2UfBQ&s=oMKpjQMXfWmMwHmANB-Qnrm2EdERzz9Oef7jcLkbyFg&e= . version is > >> 4.7.0-v8r3. It's a LSI SSD, queue depth 32. I use default setting. fio script > >> is: > >> > >> [global] > >> ioengine=libaio > >> direct=1 > >> readwrite=randread > >> bs=4k > >> runtime=60 > >> time_based=1 > >> file_service_type=random:36 > >> overwrite=1 > >> thread=0 > >> group_reporting=1 > >> filename=/dev/sdb > >> iodepth=1 > >> numjobs=8 > >> > >> [groupA] > >> prio=2 > >> > >> [groupB] > >> new_group > >> prio=6 > >> > >> I'll change iodepth, numjobs and prio in different tests. result unit is MB/s. > >> > >> iodepth=1 numjobs=1 prio 4:4 > >> CFQ: 28:28 BFQ: 21:21 deadline: 29:29 > >> > >> iodepth=8 numjobs=1 prio 4:4 > >> CFQ: 162:162 BFQ: 102:98 deadline: 205:205 > >> > >> iodepth=1 numjobs=8 prio 4:4 > >> CFQ: 157:157 BFQ: 81:92 deadline: 196:197 > >> > >> iodepth=1 numjobs=1 prio 2:6 > >> CFQ: 26.7:27.6 BFQ: 20:6 deadline: 29:29 > >> > >> iodepth=8 numjobs=1 prio 2:6 > >> CFQ: 166:174 BFQ: 139:72 deadline: 202:202 > >> > >> iodepth=1 numjobs=8 prio 2:6 > >> CFQ: 148:150 BFQ: 90:77 deadline: 198:197 > > > > More tests: > > > > iodepth=8 numjobs=1 prio 2:6, group A has 50M/s limit > > CFQ:51:207 BFQ: 51:45 deadline: 51:216 > > > > iodepth=1 numjobs=1 prio 2:6, group A bs=4k, group B bs=64k > > CFQ:25:249 BFQ: 23:42 deadline: 26:251 > > > > A true proportional share scheduler like BFQ works under the > assumption to be the only limiter of the bandwidth of its clients. > And the availability of such a scheduler should apparently make > bandwidth limiting useless: once you have a mechanism that allows you > to give each group the desired fraction of the bandwidth, and to > redistribute excess bandwidth seamlessly when needed, what do you need > additional limiting for? > > But I'm not expert of any possible system configuration or > requirement. So, if you have practical examples, I would really > appreciate them. And I don't think it will be difficult to see what > goes wrong in BFQ with external bw limitation, and to fix the > problem. I think the test emulates a very common configuration. We assign more IO resources to high priority workload. But such workload doesn't always dispatch enough io. That's why I set a rate limit. When this happend, we hope low priority workload uses the disk bandwidth. That's the whole point of disk sharing. Thanks, Shaohua