Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1267050rwb; Wed, 28 Sep 2022 16:02:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7RjQq5GPmONiqexjeUJ05ovPqBy3K4+6JG0pjco5iU0dHZGoO7gqVur3L5+gBkr02raQPC X-Received: by 2002:aa7:cd95:0:b0:457:1651:b5c1 with SMTP id x21-20020aa7cd95000000b004571651b5c1mr325273edv.211.1664406133770; Wed, 28 Sep 2022 16:02:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664406133; cv=none; d=google.com; s=arc-20160816; b=MN/zrWKr9OUakBL30xBj+/bB2YT1OGtjy+hSLbf5+ESg/RpTRPjlx1W6AqsFANnyVr AUp8ROEZoAA7Wr+hyJLzdZLWM0KvkfrELupT0SdJNMuZJdto4LzWYwMK9OiaN4ve0CFm SkAuYKhZxK4sbrP877XTxDP8w4pRBOyS0yUffkbDctAzPs3NT6mO8uH8mSYvBKzjsbnd 2s7pkLfbTmaBj5rSo+g91cFfJxqsQS4VzaxRJXKnB5XzPK75QNYq25/vWePQGzcLQqck NTgzWyTVdNYGHzNaBnbnryB0y//3s2rFK8rJgp+Kh6UPYy17AYHqi9SOSxNfYjSYzHf0 CRYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=waAn/9TptkPRIHHi0yaeZ4FHiwjtqy03MqfpsbrfLiA=; b=E2Liye5lKMY758Y710+Jx/4rDRgAnwRealYm8ShSscaRPhDQhCQQUYEG9B97er9CFK aIXlNGWYCo7DBmBVXheA1igdZ0LD548VOUFWLFlZJ2/dgZk2SkcNfZ4cMcqC971yyPE6 +oHAakG50YPwQrp6pwrI/xZ53T5YHNFBc8GixPd87rzmnQ7XmYIKeVw0xtrBd4finbwO TIWKZpjJUqW8ip5aiAt6hSm4aUmJ8C4O2Oo6bVhoHvCMd9kB9cr2+DQRHMGKxSCSyzRp E/SXPFpunIFe/97Bbp4ZAAEmUU2aafpNrdmKEep2Xj2mqgT8BbMtV9diAaOK0NjEX8zF mC5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mit.edu header.s=outgoing header.b=aiflh8CW; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm14-20020a170907948e00b0077a0f6cbfa0si6651872ejc.114.2022.09.28.16.01.45; Wed, 28 Sep 2022 16:02:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=fail header.i=@mit.edu header.s=outgoing header.b=aiflh8CW; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233186AbiI1WhV (ORCPT + 99 others); Wed, 28 Sep 2022 18:37:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234749AbiI1Wgt (ORCPT ); Wed, 28 Sep 2022 18:36:49 -0400 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6B192C4; Wed, 28 Sep 2022 15:36:40 -0700 (PDT) Received: from cwcc.thunk.org (pool-173-48-120-46.bstnma.fios.verizon.net [173.48.120.46]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 28SMaNnQ009335 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Sep 2022 18:36:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1664404586; bh=waAn/9TptkPRIHHi0yaeZ4FHiwjtqy03MqfpsbrfLiA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=aiflh8CWB4z83QjZadi3z6Fg3yVwENag9tSy1Ug1Z4rL08pXqdVQ3o3F9D4Nnn183 41QhiwaVVcU0C247awyVjOKevaYCaAS/96gCwabtVY+0VmLsuSm+28u13U2E9cQr2b DcywfjnGFBYDZKSSMiVxRWSVxvD2vobi6HiU13MYqJiLtlriur6aMHdDwc4VWQNAoG ZKfMqTYDTci2/1hv8RwPPmPktHFs+QHV6b48Gl/A+gAzkyDnUSdBsLDrYZXwh0BCWC G9y+Pq9Z4+qHDwhOb42X6tNVNO4bytflVTxBaOgTAqdbK+ZVnNK+b4weE2qrVVlW8n sdnu+DS3UCnpw== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 1E5CD15C529A; Wed, 28 Sep 2022 18:36:23 -0400 (EDT) Date: Wed, 28 Sep 2022 18:36:23 -0400 From: "Theodore Ts'o" To: "Lu, Davina" Cc: "linux-ext4@vger.kernel.org" , "adilger.kernel@dilger.ca" , "regressions@lists.linux.dev" , "stable@vger.kernel.org" , "Mohamed Abuelfotoh, Hazem" , hazem ahmed mohamed , "Ritesh Harjani (IBM)" , "Kiselev, Oleg" , "Liu, Frank" Subject: Re: significant drop fio IOPS performance on v5.10 Message-ID: References: <357ace228adf4e859df5e9f3f4f18b49@amazon.com> <1cdc68e6a98d4e93a95be5d887bcc75d@amazon.com> <5c819c9d6190452f9b10bb78a72cb47f@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5c819c9d6190452f9b10bb78a72cb47f@amazon.com> X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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-ext4@vger.kernel.org On Wed, Sep 28, 2022 at 06:07:34AM +0000, Lu, Davina wrote: > > Hello, > > My analyzing is that the degradation is introduce by commit > {244adf6426ee31a83f397b700d964cff12a247d3} and the issue is the > contention on rsv_conversion_wq. The simplest option is to increase > the journal size, but that introduces more operational complexity. > Another option is to add the following change in attachment "allow > more ext4-rsv-conversion workqueue.patch" Hi, thanks for the patch. However, I don't believe as written it is safe. That's because your patch will allow multiple CPU's to run ext4_flush_completed_IO(), and this function is not set up to be safe to be run concurrently. That is, I don't see the necessary locking if we have two CPU's trying to convert unwritten extents on the same inode. It could be made safe, and certainly if the problem is that you are worried about contention across multiple inodes being written to by different FIO jobs, then certainly this could be a potential contention issue. However, what doesn't make sense is that increasing the journal size also seems to fix the issue for you. That implies the problem is one of the journal being to small, and so you are running into an issue of stalls caused by the need to do a synchronous checkpoint to clear space in the journal. That is a different problem than one of there being a contention problem with rsv_conversion_wq. So I want to make sure we understand what you are seeing before we make such a change. One potential concern is that will cause a large number of additional kernel threads. Now, if these extra kernel threads are doing useful work, then that's not necessarily an issue. But if not, then it's going to be burning a large amount of kernel memory (especially for a system with a large number of CPU cores). Regards, - Ted