Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4758468pxj; Tue, 25 May 2021 16:04:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywKeVTF1HzOSsLDnKtVN2+FrrZL1Tyb42ZcoqyTajLg10M3sazOYba/Ate0tv4bFxPLPZO X-Received: by 2002:a92:6809:: with SMTP id d9mr20669911ilc.87.1621983850207; Tue, 25 May 2021 16:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621983850; cv=none; d=google.com; s=arc-20160816; b=UD27BacbjT9SR64lXPBn0gkxyId4eE8fL01ogHgiSybDhTBtOFTfYuVqw7ds3HlTww CBxg2Dvfb3QyUAHVfPXdTYmjB4YXmMFnXxCrtYJg66tfwhjKQtBC1wrWdD0z75jWaquO t5Gr5qSC6QePMDfr3NEV+oHJRy+XdCPljLjWmcC+IrdOU+5aDaY0KWY6q+LRKGCCQG+V 1qgkFNkzPx7N8PX8Vi1bQ8TJBygfF6FS5rf+o2ahALTi5v48h31eKCQJw9UrH6xLZR6K Z48ST6k4rDavEzSA05HHBMn9Am/fR0gdo48qJ9B7fZqe82a5IbRMYdHmuUV3SSdBLSIP aPXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:to:cc:in-reply-to:date:subject :mime-version:message-id:from:dkim-signature; bh=lQU/mw2gew9Xsu/0BklV7sCPI0gkzm5yQeyxIIbvBKw=; b=QZpXC2kGGiLSwnSVJMLUByatXyHEZr/gdmdFwHva8ywyQU4xVSJuUVhincqPhtEwV+ LKy7Qk0D8EaU3fERKjvypAnKN8Md8JRL6UxVI3h2ozeoFooJqlMdgGbAP/CxVjpxj6c2 GQ1H/1aK7IE19VLUt3x/qwkb9n2DGX6QjimL4BFtufEoCt4wY063ICh/zqG9JZKDo4ZN TyUK9ZBH28Lo3wIv2fUyyAVevv6GkIzPxZ0w4ctSx9ok2m4qDvTQU2YNco5kuFg/9oEV YVlMwLqvtP6TSW3wwRKRqrCt0AMJlY6JukBNyHOrm3TbMnwm0f1/tV27gmLUKRualCdT gJpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dilger-ca.20150623.gappssmtp.com header.s=20150623 header.b=HMjd6r8W; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si21065829jaj.50.2021.05.25.16.03.57; Tue, 25 May 2021 16:04:09 -0700 (PDT) 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=@dilger-ca.20150623.gappssmtp.com header.s=20150623 header.b=HMjd6r8W; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229898AbhEYWth (ORCPT + 99 others); Tue, 25 May 2021 18:49:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231164AbhEYWtg (ORCPT ); Tue, 25 May 2021 18:49:36 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 610F9C06175F for ; Tue, 25 May 2021 15:48:05 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id g18so23101481pfr.2 for ; Tue, 25 May 2021 15:48:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dilger-ca.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=lQU/mw2gew9Xsu/0BklV7sCPI0gkzm5yQeyxIIbvBKw=; b=HMjd6r8WAvXPNaQI4bYAP8fKI8dQWuW89LsVrprrgTOuU5+BFUxRmFqVp3hgOAxagR cfNBC4uv3kNMsqzqoimFA4P0hBzrScP7tZDugDdtQRaMCIsp83d7eP4aRFgdjTOAkqaY EcBySS5OB1Jp1RM9rOIeg4vGNuAodjB8ioNpZliXG5YHvgOI5vg6YkAsh8UlVfEUorgi tooZ04Fa4XmOI54vufP3tUNGpQ/vItEuv5AaKv2Kz04lqJiQQJioKi7vXh+7NeFtpPl8 PrkJ7Fh3n+1xNy+RRz0AlWzBWRZxgnKN90n8tN2vGcjphifpsmzNuElKDbcfnWwdUmZI T4tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=lQU/mw2gew9Xsu/0BklV7sCPI0gkzm5yQeyxIIbvBKw=; b=mkQS4aplEPq6pGv2KKqtuXN3hfOTykWloaZxS3GKUK13xRSw/jQMkA12KFziVF+UUV tKB/RnwUzTrf10Jg6Q9OrNGJ8aV+x75MO6CxLb8C1CNwykhFlCNVUoOcUdml1efppWf1 zR5zq3vj/FtIwMm1uP5b0Tj96mObtjU1bvzRqEciULS3iv1QDRm0/dM/bgWcPUhX09vt WY/M9V5YPfbtCJdRJXFIMkfxjetk6FZLJvr4Uo19QNSJglf4J6ec7bUsTRn2crXeABMG RvYWDr2zv9a4mel251h15N0Iw2dDZx5BLq7grv4Ctb/ZlOOZ3ik6/gPZ/j9P1y5Ykv4g JC5w== X-Gm-Message-State: AOAM533p7/GLVLhxWrERxPFKv4TsUn0NSDZrjQ84WVkHxXI1yNaZgprI u/lvqV+ykowifFH1t3vjELhIHbF4+WDB1O9W X-Received: by 2002:a05:6a00:882:b029:2de:b01d:755a with SMTP id q2-20020a056a000882b02902deb01d755amr32457813pfj.43.1621982884571; Tue, 25 May 2021 15:48:04 -0700 (PDT) Received: from cabot.adilger.int (S01061cabc081bf83.cg.shawcable.net. [70.77.221.9]) by smtp.gmail.com with ESMTPSA id n30sm15459221pgd.8.2021.05.25.15.48.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 May 2021 15:48:03 -0700 (PDT) From: Andreas Dilger Message-Id: <59253C17-3155-4ADF-B965-CEA375230483@dilger.ca> Content-Type: multipart/signed; boundary="Apple-Mail=_47C6E327-64C0-41DB-8EFA-2AED6EDE9B5E"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: How capacious and well-indexed are ext4, xfs and btrfs directories? Date: Tue, 25 May 2021 16:48:01 -0600 In-Reply-To: Cc: Josh Triplett , David Howells , Theodore Ts'o , "Darrick J. Wong" , Chris Mason , Ext4 Developers List , xfs , linux-btrfs , linux-cachefs@redhat.com, linux-fsdevel , NeilBrown To: Matthew Wilcox References: <206078.1621264018@warthog.procyon.org.uk> <6E4DE257-4220-4B5B-B3D0-B67C7BC69BB5@dilger.ca> X-Mailer: Apple Mail (2.3273) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org --Apple-Mail=_47C6E327-64C0-41DB-8EFA-2AED6EDE9B5E Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On May 25, 2021, at 3:26 PM, Matthew Wilcox wrote: > > On Tue, May 25, 2021 at 03:13:52PM -0600, Andreas Dilger wrote: >> Definitely "-o discard" is known to have a measurable performance impact, >> simply because it ends up sending a lot more requests to the block device, >> and those requests can be slow/block the queue, depending on underlying >> storage behavior. >> >> There was a patch pushed recently that targets "-o discard" performance: >> https://patchwork.ozlabs.org/project/linux-ext4/list/?series=244091 >> that needs a bit more work, but may be worthwhile to test if it improves >> your workload, and help put some weight behind landing it? > > This all seems very complicated. I have chosen with my current laptop > to "short stroke" the drive. That is, I discarded the entire bdev, > then partitioned it roughly in half. The second half has never seen > any writes. This effectively achieves the purpose of TRIM/discard; > there are a lot of unused LBAs, so the underlying flash translation layer > always has plenty of spare space when it needs to empty an erase block. > > Since the steady state of hard drives is full, I have to type 'make clean' > in my build trees more often than otherwise and remember to delete iso > images after i've had them lying around for a year, but I'd rather clean > up a little more often than get these weird performance glitches. > > And if I really do need half a terabyte of space temporarily, I can > always choose to use the fallow range for a while, then discard it again. Sure, that's one solution for a 1TB laptop, but not large filesystems that may be hundreds of TB per device. I don't think the owners of Perlmutter (https://www.nersc.gov/systems/perlmutter/) could be convinced to avoid using 17PB of their flash to avoid the need for TRIM to work. :-) Cheers, Andreas --Apple-Mail=_47C6E327-64C0-41DB-8EFA-2AED6EDE9B5E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIzBAEBCAAdFiEEDb73u6ZejP5ZMprvcqXauRfMH+AFAmCtfqEACgkQcqXauRfM H+Dr7RAAv/S5K9b+d4nIh2CHohXKTdMiaX/wu1fLb671uTS1hPABVL+GTVxJlMnQ J9zXWz0qOxR3XpjlaoaaDd4bp8sOvdiNyKCVspYt3dA2+70OXY0b3NCNoETx/xC+ MI8Bfe9nOvPd5mNq9RYLL1TmlLlEdYPkEgqQhlFSd2j5YFbTx91KQyIlGpmYJozy wyQsEDLx68e/m8mVl4uDgycqVaR7ECzxDqntELWDD94pR9lecScZszOirZUdRWfy o9/QuHI0GRsGH1ttenK00MvV2mtiHR4cB891nx63lrOKrQ6xW5dvu0/xGvWqtHUw CGeWDC/ROL8cN1tAmD22z9cs+lgopez/ISysUW6GxhZn2z65vTw66ooBymT1PTHE J3ZDVtnBW9lRDeCpAY0mTEvTc9OesBc8YiEB+Tz3XQnIk2eEKCvVWbio8OR+mPWs 32GVJHVc+jZDVUxDuV5HdWjErLndLIkfgylEZm0BHz6+se/beBTvfgZsY60o1VvL sZGrITkdaGbTwb+FlQnNZd2Nj7/t1BqWm8uIYrORjGJshsct3N8lXH5MmBJlwenA wezCKjE5kjCUjhVkpd31lSZQM/Jjycm1SWFt/YyZaiNA7C6MvvqzV327hvDUTwt7 LOMQ8MOtgO2/cRKta6uMOOmYnDaR9U07t8W/taStu+i8mvVvwVk= =SSE/ -----END PGP SIGNATURE----- --Apple-Mail=_47C6E327-64C0-41DB-8EFA-2AED6EDE9B5E--