Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2474657ybh; Mon, 5 Aug 2019 01:35:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxlicxDJOjcWDgpU+H5OwUt0y37XSnlM1wSnD3sj+tzSEMn9zqgIQ4Wkbr8BToAqhZmKDVc X-Received: by 2002:a63:e54:: with SMTP id 20mr132453741pgo.244.1564994112501; Mon, 05 Aug 2019 01:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564994112; cv=none; d=google.com; s=arc-20160816; b=l7TNpoSacw1sJtYOwbeuABh/tKZpyv4mTryAyA9laKQdpMoDoHenrTKv2g82DFWG4v Z3FWwblUP2ABbEfrkaPhmPRygd7sB3ZJdsg9K1Cvbqag3ztJ8ZcSYH3oUJMPaa4wNDhE HZ0Ofi8cqIO8sH2FzGmo5nw1OBYfJ8DsuNTAhpSadvDrBEWtznN/o2GQcLqh+iISCzD7 Zq0n7s7BKfQARSMfXpOKfK5C9HArbsL4FhqWXJNJmhlSSVej5EEGAianTj/xUcjuVIis HFHSsf0P0iooXJGsDGWI3bO6pYcxgOuQWZZSFvGuoZFp/xLbYDFLiv6JWO4DEM6Ziwvq ssSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8F+HQKWf4Uvfwyri/kk89vK9RIySM6C45og39vxQQAI=; b=qwQb0NHQVYef9Hemc47hOepE6i4eVWWpmv8Xz2WFm2Gn4x5GQx2MFz5PBEo28P1mDJ iEkx/pYxO6lPC6MqFXKKXllJCLBX898M0sFY5HINFVxdfj6gxXzyD/Im144p2HEiiIjg NrnG2Vu/YLUY46gmERLF4CeBAWNyAYhIM5db0p7qJTfiKVKeFrWhhiPqRsvn/KflVkhW f0fCjUxAayKKYlk+L21pAmABPB87MtqLW/Sa2mEFPWG9sxluMZ6BEw4K4xfynbVqsV/Y D/lT7DPDyEB11ltWqIW8EmI52YEzkaNGhlhxT7Dgz0ySNReId1aMz/5a+Ipyfp7wtzGJ AoMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloud.ionos.com header.s=google header.b=DNkLi0gd; 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 z189si42386859pgb.491.2019.08.05.01.34.57; Mon, 05 Aug 2019 01:35:12 -0700 (PDT) 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; dkim=pass header.i=@cloud.ionos.com header.s=google header.b=DNkLi0gd; 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 S1727875AbfHEIeQ (ORCPT + 99 others); Mon, 5 Aug 2019 04:34:16 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46464 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726423AbfHEIeP (ORCPT ); Mon, 5 Aug 2019 04:34:15 -0400 Received: by mail-wr1-f68.google.com with SMTP id z1so83471644wru.13 for ; Mon, 05 Aug 2019 01:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloud.ionos.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8F+HQKWf4Uvfwyri/kk89vK9RIySM6C45og39vxQQAI=; b=DNkLi0gdXwv6Y6UMtPr9DU4AmalOg95xaEsu9azkntWiYmTcnDEMUlgJMAMKs8Ddhx QuJoVnEBHOyO/lOwKPLncImDeDrnKFB2efTZGuxjHawe7fMK+w0YORkvTz6DT7szw/Bm 6bR8JyzkxVUesVARG42QXpHA6JUmPXJrYFFGj8uvOcJY4VOdjLl6ojx9LQW1q+3M4AmH 6un1dXRFZx73DpHhRL98Kusb4uQ+o8urJ6zRjQnTzdWa4oqOEl2jD3ZUNmigt4OAb5di lLTh+ENw1DtzpKsb/f+c43Y1fddG/OMgbkbZzhFAL5SGLcPPm9xDLWwNiABYCet3wk6/ qJ5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8F+HQKWf4Uvfwyri/kk89vK9RIySM6C45og39vxQQAI=; b=SdlmS47W00hwkxk6oRkI/Y3kflHESkb3VM5GsDfeYljZJrG0l3L6lcXsZJhXIAm5wg M54oDhXSKDufp5K2J8z0EhaWDdmR7SohaSrEoRQA55hNQLHwx/OubtaSaCD6/rv4BU7U S2VA2uBJMwSkjiFwTrz6usWUg8ELu4+2GOf4nL8unmfM76AzuBlTTa9d4X/vPyyIst+A 2d9WpIGb/JTrkCSOCrKl2SpAw8x4eX3bhO+QWFmKRZSa8ACVhdy5t2Qu7DrChKLmb1V5 aZ7JkHyufcU0cQNoKqo/ACQTbLoaUkwA9r7QSzAl6TGL8ox1vnbMP0EdiIQgUTTacxr/ eGdA== X-Gm-Message-State: APjAAAVmpTIyzpEb5hCl2F2ApBVzpRLKeDtblE63t/8zmEwCPNGk0hKu xca4eyNCyIWRa9wtaAnu+v8R+07CKPCeRnLAfj5h9g== X-Received: by 2002:adf:a299:: with SMTP id s25mr153432677wra.74.1564994052881; Mon, 05 Aug 2019 01:34:12 -0700 (PDT) MIME-Version: 1.0 References: <0a83fde3-1a74-684c-0d70-fb44b9021f96@molgen.mpg.de> In-Reply-To: <0a83fde3-1a74-684c-0d70-fb44b9021f96@molgen.mpg.de> From: Jinpu Wang Date: Mon, 5 Aug 2019 10:34:01 +0200 Message-ID: Subject: Re: Kernel 4.14 + has 100 times higher IO latency than Kernel 4.4 with raid1 To: Paul Menzel Cc: linux-kernel@vger.kernel.org, linux-raid , Alexandr Iarygin Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 2, 2019 at 9:52 PM Paul Menzel wrote: > > Dear Jinpu, > > > On 02.08.19 16:48, Jinpu Wang wrote: > > > We found a problem regarding much higher IO latency when running > > kernel 4.4.131 compare to 4.14.133, tried with latest upstream > > 5.3-rc2, same result. > > > > Reproducer: > > 1 create md raid1 with 2 ram disks: > > sudo mdadm -C /dev/md0 -l1 -n2 -e1.2 --bitmap=internal /dev/ram[0-1] > > 2 run fio command with rate_iops: > > fio --rw=write --ioengine=libaio --iodepth=32 --size=1000MB > > --rate_iops=5000 --direct=1 --numjobs=1 --runtime=20 --time_based > > --name=write-test --filename=/dev/md0 > > > > result on 4.4 kernel: > > root@ib2:~# fio --rw=write --ioengine=libaio --iodepth=32 > > --size=1000MB --rate_iops=5000 --direct=1 --numjobs=1 --runtime=20 > > --time_based --name=write-test --filename=/dev/md0 > > write-test: (g=0): rw=write, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=32 > > fio-2.2.10 > > Starting 1 process > > Jobs: 1 (f=1), CR=5000/0 IOPS: [W(1)] [100.0% done] [0KB/20008KB/0KB > > /s] [0/5002/0 iops] [eta 00m:00s] > > write-test: (groupid=0, jobs=1): err= 0: pid=3351: Fri Aug 2 15:31:26 2019 > > write: io=400004KB, bw=19999KB/s, iops=4999, runt= 20001msec > > slat (usec): min=3, max=26, avg= 3.12, stdev= 0.36 > > clat (usec): min=0, max=116, avg= 2.04, stdev= 1.33 > > lat (usec): min=3, max=141, avg= 5.19, stdev= 1.39 > > clat percentiles (usec): > > | 1.00th=[ 1], 5.00th=[ 2], 10.00th=[ 2], 20.00th=[ 2], > > | 30.00th=[ 2], 40.00th=[ 2], 50.00th=[ 2], 60.00th=[ 2], > > | 70.00th=[ 2], 80.00th=[ 2], 90.00th=[ 2], 95.00th=[ 3], > > | 99.00th=[ 3], 99.50th=[ 3], 99.90th=[ 3], 99.95th=[ 3], > > | 99.99th=[ 86] > > bw (KB /s): min=20000, max=20008, per=100.00%, avg=20005.54, stdev= 3.74 > > lat (usec) : 2=3.37%, 4=96.60%, 10=0.01%, 20=0.01%, 50=0.01% > > lat (usec) : 100=0.01%, 250=0.01% > > cpu : usr=4.25%, sys=0.00%, ctx=198550, majf=0, minf=11 > > IO depths : 1=100.0%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=0.0% > > submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% > > complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% > > issued : total=r=0/w=100001/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0 > > latency : target=0, window=0, percentile=100.00%, depth=32 > > > > Run status group 0 (all jobs): > > WRITE: io=400004KB, aggrb=19999KB/s, minb=19999KB/s, maxb=19999KB/s, > > mint=20001msec, maxt=20001msec > > > > Disk stats (read/write): > > md0: ios=61/99539, merge=0/0, ticks=0/0, in_queue=0, util=0.00%, > > aggrios=0/0, aggrmerge=0/0, aggrticks=0/0, aggrin_queue=0, > > aggrutil=0.00% > > > > result on 5.3 kernel > > root@ib1:/home/jwang# fio --rw=write --ioengine=libaio --iodepth=32 > > --size=1000MB --rate_iops=5 --direct=1 --numjobs=1 --runtime=20 > > --time_based --name=write-test --filename=/dev/md0 > > write-test: (g=0): rw=write, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=32 > > fio-2.2.10 > > Starting 1 process > > Jobs: 1 (f=1), CR=5/0 IOPS: [W(1)] [100.0% done] [0KB/20KB/0KB /s] > > [0/5/0 iops] [eta 00m:00s] > > write-test: (groupid=0, jobs=1): err= 0: pid=1651: Fri Aug 2 17:16:18 2019 > > write: io=413696B, bw=20683B/s, iops=5, runt= 20001msec > > slat (usec): min=2, max=51803, avg=1028.62, stdev=7250.96 > > clat (usec): min=0, max=91, avg=17.76, stdev=28.07 > > lat (usec): min=3, max=51892, avg=1046.50, stdev=7254.89 > > clat percentiles (usec): > > | 1.00th=[ 0], 5.00th=[ 0], 10.00th=[ 0], 20.00th=[ 0], > > | 30.00th=[ 1], 40.00th=[ 1], 50.00th=[ 1], 60.00th=[ 1], > > | 70.00th=[ 19], 80.00th=[ 44], 90.00th=[ 68], 95.00th=[ 80], > > | 99.00th=[ 88], 99.50th=[ 91], 99.90th=[ 91], 99.95th=[ 91], > > | 99.99th=[ 91] > > bw (KB /s): min= 20, max= 21, per=100.00%, avg=20.04, stdev= 0.21 > > lat (usec) : 2=67.33%, 10=0.99%, 20=1.98%, 50=11.88%, 100=17.82% > > cpu : usr=0.00%, sys=0.00%, ctx=77, majf=0, minf=10 > > IO depths : 1=68.3%, 2=2.0%, 4=4.0%, 8=7.9%, 16=15.8%, 32=2.0%, >=64=0.0% > > submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% > > complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% > > issued : total=r=0/w=101/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0 > > latency : target=0, window=0, percentile=100.00%, depth=32 > > > > Run status group 0 (all jobs): > > WRITE: io=404KB, aggrb=20KB/s, minb=20KB/s, maxb=20KB/s, > > mint=20001msec, maxt=20001msec > > > > Disk stats (read/write): > > md0: ios=0/100, merge=0/0, ticks=0/0, in_queue=0, util=0.00%, > > aggrios=0/0, aggrmerge=0/0, aggrticks=0/0, aggrin_queue=0, > > aggrutil=0.00% > > ram0: ios=0/0, merge=0/0, ticks=0/0, in_queue=0, util=0.00% > > ram1: ios=0/0, merge=0/0, ticks=0/0, in_queue=0, util=0.00% > > > > During the tests the following kernel parameters are applied: > > processor.max_cstate=0 idle=poll mitigations=off > > > > Could anyone give us a hint, what could lead to such a huge difference? > > Sorry, I have no idea, but as you can easily reproduce it with RAM > disks, bisecting the commit causing this quite easily. > > Your tests should also be added to some test suite (kselftest)? > > > Kind regards, > > Paul Thanks Paul, I'm bisecting now, will report back the result. Note: the result for 5.3 was done with rate_iops 5 by mistake, but with 5000 it doesn't change the result.