Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp414730pxb; Wed, 18 Nov 2020 07:43:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcb4nBwlw6iAyxdUW5hoYbH3SEIjxfQPuvX4/b/8OJdc8HjaWRv/wzfGP90RO0wGovXbSZ X-Received: by 2002:a17:906:914d:: with SMTP id y13mr13100212ejw.45.1605714222709; Wed, 18 Nov 2020 07:43:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605714222; cv=none; d=google.com; s=arc-20160816; b=YAtUG+uYqe0F0TMTL4EjUO+kMmW0W7AF+1AHf2o79X5ZofS8uaomfFlGjUV5LKf5xN aXtH4us+U1oMW7ME9LFfxi/SZfwOhxfIqU2Cw6pmEjlqYOnO1GcOC3GKKpJFO3AahuPi mCLreUdOLOF+xgRfxqmRYGYoUIQdqnRGQ6Oe/V7Su8B/wiXjqLlQGsb6sAhpGwHJDozW SpZT5oVXcWnHYqVWPhvFCLz6jht+HVE5UCQxGsfqYONmBE45WtpHq7Q3dIUL8DnNvNKo kymvX7+WE6JOtr38rQ0f+auViRE1SaCzvDyIMWD+KBShGgGoGzy+YweLlLsEUBeWnn1L CbWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=DgnEoMuEidHu66jEvK6JXNOLWM5hp9t9dmgKJbWHLrI=; b=gkp7c+eYYJ7rXQfPGJX09RHtjnR03oAa44cseyG7ZfIrubKU2AIYgbjeb+ql7Qsabz dFvanYOuCdMBrvbcmxg0ztwLDjGKwQHWVP4hXBPAH7Nzql50AbMvaIfSQ4XPLkqkqYF7 7bUfmrRrf7E3m1+CSvnTX2yxxVF6nDSNgJw1HOj/mlx1qJiMGtlAsbN96lZVQQ2AGDq+ 55f2oyWqfAv88qnDk1e2JdeXt9Pjei6eg1Hjunm9ofoN9KWhiR9JbnJjhnrujESDbzoH Wakd61vF1Ov35EmaLV+1RRI+NgAlObxd2qDgNo4Sf5f0DeAeaUWjhU8Do8GhkCHlI20B /hbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=n1QBNlOx; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j19si15824381ejs.634.2020.11.18.07.43.18; Wed, 18 Nov 2020 07:43:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=n1QBNlOx; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727584AbgKRPlv (ORCPT + 99 others); Wed, 18 Nov 2020 10:41:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727412AbgKRPlu (ORCPT ); Wed, 18 Nov 2020 10:41:50 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AD82C0613D4 for ; Wed, 18 Nov 2020 07:41:50 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id w8so2923730ybj.14 for ; Wed, 18 Nov 2020 07:41:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=DgnEoMuEidHu66jEvK6JXNOLWM5hp9t9dmgKJbWHLrI=; b=n1QBNlOxqeQgsE47DwPhyk00F3IKYVP7EoNUfNFHUiKuNLNq88etkqUYaf5EvnxQim 46bNYwAsct7u0kvPIBDN7fj+PSKgNniF391iumnEAmQkf/o3w20WjtePSJJvmRMrpBhd wZPOoe96kdxqT5wLaQ/ynPY6JswgbLzajOoG2pX6qg/69iFn1QN6A62rcfCnbbRFzBth 56iZ4WZrC8zZPG/B42vXPLVKu3gSTchryHUdZYBruCrPtGoes1pt7eh8RjMdWBvfcHKq ZKzt/4hfrPIqTgOUdRAgdS+U/pELwSapc9FaGebYE1iIhc5dxpc1YrNWF9pLiA0qPZ3r Wjxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=DgnEoMuEidHu66jEvK6JXNOLWM5hp9t9dmgKJbWHLrI=; b=H0AElu01TjQIikqoEUbMQqLTFr1Uj/09LzuYtq3nZNxn+oESC0SwlOW819tqZsxtAj UiICgpSJArLOc3sD5uUzSRKD9DuH52zm01WuKNYBRHKR+NDN91Bjvh+RDJwpoY7VzJvu 0ElkzV309bglA4idGp5yT5GILcSELVoUNPIYlZW947btw/1j1gKtwp0aaxwIEmQZugFH 4JcuN5l/QzaHw9MjpKEhJEjNoVpRFeEd2dHwDHlG6TjgxOpkzBXEcIjUQgTy1e1TTjVS xn/NnNtM5BTP60d2kbZoEkDTdWn3lJydlWQUlzgY3fWKiPvPo9qsfA0UsMiMFvfwcuwT QxEQ== X-Gm-Message-State: AOAM531GovnerJbDLb7LrhYu16mS7yOtZhC86oZToQEuHJEV72gci77r abF9h+bd9jEstFPBN9ownWk0ulYcA2RaqBf9EPRZu11wmA4GnFhQivDoZnZi7Wjcsj9aiwLriss yBixF9moif1K57KNt2Ko9gWjDURagMcRbh2W9MJ/V8+XXLv7AtjUY9LprUa7PJjNLjgVpirvqSQ RacHYjdNE= Sender: "saranyamohan via sendgmr" X-Received: from saranyamohan.svl.corp.google.com ([100.116.76.178]) (user=saranyamohan job=sendgmr) by 2002:a25:2c3:: with SMTP id 186mr7560017ybc.205.1605714109799; Wed, 18 Nov 2020 07:41:49 -0800 (PST) Date: Wed, 18 Nov 2020 07:39:31 -0800 In-Reply-To: <20201118153947.3394530-1-saranyamohan@google.com> Message-Id: <20201118153947.3394530-46-saranyamohan@google.com> Mime-Version: 1.0 References: <20201118153947.3394530-1-saranyamohan@google.com> X-Mailer: git-send-email 2.29.2.299.gdc1121823c-goog Subject: [RFC PATCH v3 45/61] e2fsck: make default smallest RA size to 1M From: Saranya Muruganandam To: linux-ext4@vger.kernel.org, tytso@mit.edu Cc: adilger.kernel@dilger.ca, Wang Shilong , Saranya Muruganandam Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Wang Shilong If we have a smaller inodes per group, default ra size could be very small(etc 128KiB), this hurts performances. Tune above 128K to 1M, i see pass1 time drop down from 677.12 seconds to 246 secons with 32 threads. Signed-off-by: Wang Shilong Signed-off-by: Saranya Muruganandam --- e2fsck/readahead.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/e2fsck/readahead.c b/e2fsck/readahead.c index 38d4ec42..40b73664 100644 --- a/e2fsck/readahead.c +++ b/e2fsck/readahead.c @@ -234,6 +234,8 @@ int e2fsck_can_readahead(ext2_filsys fs) return err != EXT2_ET_OP_NOT_SUPPORTED; } +#define MIN_DEFAULT_RA (1024 * 1024) + unsigned long long e2fsck_guess_readahead(ext2_filsys fs) { unsigned long long guess; @@ -245,6 +247,8 @@ unsigned long long e2fsck_guess_readahead(ext2_filsys fs) * in e2fsck runtime. */ guess = 2ULL * fs->blocksize * fs->inode_blocks_per_group; + if (guess < MIN_DEFAULT_RA) + guess = MIN_DEFAULT_RA; /* Disable RA if it'd use more 1/50th of RAM. */ if (get_memory_size() > (guess * 50)) -- 2.29.2.299.gdc1121823c-goog