Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1914055pxb; Sat, 2 Apr 2022 08:04:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyzUpqDRXlh+eDtTZFnYK3GT6HNqMt+zPx4oyzbnzd7Pp3U3tKZrE+AiDjmu3Vnwhvn55g X-Received: by 2002:a17:90b:38c7:b0:1c7:6afb:fac6 with SMTP id nn7-20020a17090b38c700b001c76afbfac6mr17260765pjb.198.1648911849321; Sat, 02 Apr 2022 08:04:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648911849; cv=none; d=google.com; s=arc-20160816; b=Qoewmh6flGOQ07UJz6fWadgFFofC+1w4Psb59IMsQSfj34fMbmfX8FXX9QBJ5RxSwr eQz8Ntm8Cav1US+NOruaK0kn0FTKn7nzNZLWwUrYDe5UTOb7AZzAI4UHZtiJNEiOMZZF yylTb5zHG37hAdZOlvIQp3D1P65pjpTF8LQu8s1jm3N1uN+RP0dD0Sr1ZVC7rs5RWeVE lJiV9a/uGZbvByE0kQ9qjfCMZyA0HMuWuiaG44Mv5A1Kt5/3GJfahkg18OdGPPBCo2xc H/nf3kE3JtikxvZ0fwht/A2o0kZ3i8eUslf9exmdsAZzOdMcToiP+1YrCr0KjagsRyMw 3shw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=H/HIIOtE6ezWt3oBMOEbUNvqPRvMS/qhwtcdJgLLn40=; b=PENtwZ5xt7/rd26PnOBJRc+Dt8rE2X6EkwcPPheeD5goDCOUMvUPjNOxLMLko9iw0X bJcg1IDnT8/ltk/eZMn4ZTbZVni4TOVzVRj/srJG3jgEKGI1BLPDk/t0SbHV2ZYu5uBw C42YCyAGDWDirRR7bA1hC5g7XouSrAIEe38ylE0UeW6ZbN3RvNOoS2KhdbTypIPsSNoS X+DJqRDS+N5yAP9AsQLRzvPEz/gxZxhigFgkdh7/NIhueuN0btkcUjcYtCVRAfBzzthO H/nyuwNHkAHMDK26mNPRYhH9h/1aHcKCvqALfk6pn4DzshIrje4kiyFB/h0HbuO50/AF 9ZpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@michaelmarod.com header.s=protonmail header.b=QFUpB8Mf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a056a001a5000b004fa3a8dffa6si5687822pfv.93.2022.04.02.08.03.54; Sat, 02 Apr 2022 08:04:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@michaelmarod.com header.s=protonmail header.b=QFUpB8Mf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242817AbiCaXYC (ORCPT + 99 others); Thu, 31 Mar 2022 19:24:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231898AbiCaXYC (ORCPT ); Thu, 31 Mar 2022 19:24:02 -0400 Received: from mail-4323.proton.ch (mail-4323.proton.ch [185.70.43.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 017C749685 for ; Thu, 31 Mar 2022 16:22:13 -0700 (PDT) Date: Thu, 31 Mar 2022 23:22:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=michaelmarod.com; s=protonmail; t=1648768931; bh=H/HIIOtE6ezWt3oBMOEbUNvqPRvMS/qhwtcdJgLLn40=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=QFUpB8Mf5Yo249YgcpZ2mBq/kbYlExC4LlzZC9jN5oobhUwMNnV3yPX5RgUtdCQV9 stnloZ02HxUnlbbDG8BgBswAfG4aNxP0QPBTKspeZSh5CwVkzzoPq1wY2p8tuo/Jxf FPUqDsTIhOGhqZwXivTEpSjnx3bJKQpAm64p14zk= To: Christoph Hellwig From: Michael Marod Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Reply-To: Michael Marod Subject: Re: NVME performance regression in Linux 5.x due to lack of block level IO queueing Message-ID: <4034AD9F-2A6A-4AE6-B5FC-58FC2BC238F5@michaelmarod.com> In-Reply-To: References: <51E3A396-F68B-496D-AE36-B0457A3B0968@michaelmarod.com> <847D3821-1D92-468C-88C3-34284BA7922E@michaelmarod.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Good call -- Turns out that that cache issue is resolved in 5.17. I tried a= number of kernels and narrowed it down to a problem that started after 4.9= and before 4.15, and ended some time after 5.13. Namely, 4.9 is good, 4.15= is bad, 5.13 is bad, and 5.17 is good. I did not bisect it all the way dow= n to the specific versions where the behaviors changed. Device r/s w/s rkB/s wkB/s rrqm/s wrqm/s %rrqm = %wrqm r_await w_await aqu-sz rareq-sz wareq-sz svctm %util nvme1n1 2758.00 2783.00 11032.00 11132.00 0.00 0.00 0.00 = 0.00 0.10 0.03 0.36 4.00 4.00 0.18 100.00 nvme0n1 2830.00 2875.00 11320.00 11500.00 0.00 0.00 0.00 = 0.00 0.10 0.03 0.39 4.00 4.00 0.18 100.00 With regards to the performance between 4.4.0 and 5.17, for a single thread= , 4.4.0 still had better performance over 5.17. However, the 5.17 kernel wa= s significantly better at multiple threads. In fact, it is so much better I= don't believe the results (10x improvement!). Is this to be expected that = a single thread would be slower in 5.17, but recent improvements make it po= ssible to run many of them in parallel more efficiently? # /usr/local/bin/fio -name=3Drandrw -filename=3D/opt/foo -direct=3D1 -iodep= th=3D1 -thread -rw=3Drandrw -ioengine=3Dpsync -bs=3D4k -size=3D10G -numjobs= =3D16 -group_reporting=3D1 -runtime=3D120 // Ubuntu 16.04 / Linux 4.4.0: Run status group 0 (all jobs): READ: bw=3D54.5MiB/s (57.1MB/s), 54.5MiB/s-54.5MiB/s (57.1MB/s-57.1MB/s)= , io=3D6537MiB (6854MB), run=3D120002-120002msec WRITE: bw=3D54.5MiB/s (57.2MB/s), 54.5MiB/s-54.5MiB/s (57.2MB/s-57.2MB/s)= , io=3D6544MiB (6862MB), run=3D120002-120002msec // Ubuntu 18.04 / Linux 5.4.0: Run status group 0 (all jobs): READ: bw=3D23.5MiB/s (24.7MB/s), 23.5MiB/s-23.5MiB/s (24.7MB/s-24.7MB/s)= , io=3D2821MiB (2959MB), run=3D120002-120002msec WRITE: bw=3D23.5MiB/s (24.6MB/s), 23.5MiB/s-23.5MiB/s (24.6MB/s-24.6MB/s)= , io=3D2819MiB (2955MB), run=3D120002-120002msec // Ubuntu 18.04 / Linux 5.17: Run status group 0 (all jobs): READ: bw=3D244MiB/s (255MB/s), 244MiB/s-244MiB/s (255MB/s-255MB/s), io= =3D28.6GiB (30.7GB), run=3D120001-120001msec WRITE: bw=3D244MiB/s (256MB/s), 244MiB/s-244MiB/s (256MB/s-256MB/s), io= =3D28.6GiB (30.7GB), run=3D120001-120001msec Thanks, Michael