From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC8A1C47087 for ; Tue, 25 May 2021 22:13:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E4EB61409 for ; Tue, 25 May 2021 22:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232245AbhEYWPW (ORCPT ); Tue, 25 May 2021 18:15:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:53962 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232129AbhEYWPW (ORCPT ); Tue, 25 May 2021 18:15:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F38A761019; Tue, 25 May 2021 22:13:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621980832; bh=gN3m3jr0zpW3uBjIUscZ0OUKn0VJlnlUIIIpzIpW9HU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tc+axs4ghK1XxAO0iEP9qy0VgFfgmcrUquI8G5+rvnWHWniLsNzsZKdZNJ1ldG+VT 6nrbHlOXDl5dh7l572t1pa0WroS62LBWyJjJFQyMH+8O73rpELaUqMyOfi5YFX9W+V Uh7S8dftq/Ehs3csuqmGD0aojn2ypxTjId5lMt/A7GzOKLjcF766zxXK0GQLjvz/f2 EWiNQiAbBToLu81W+13a2le/460p3vVNPI1B0rRjaBKa8NlmuPgeUSCWApyuFafccp xTFUoWoW1QZRKLzwE9VyvQRMyxzFhSFLbzHeA1U+g2lPdxKu/UC0L1UHbZz7QlNdtj /R0EFElgdoNUQ== Date: Tue, 25 May 2021 15:13:51 -0700 From: "Darrick J. Wong" To: Matthew Wilcox Cc: Andreas Dilger , Josh Triplett , David Howells , Theodore Ts'o , Chris Mason , Ext4 Developers List , xfs , linux-btrfs , linux-cachefs@redhat.com, linux-fsdevel , NeilBrown Subject: Re: How capacious and well-indexed are ext4, xfs and btrfs directories? Message-ID: <20210525221351.GB202068@locust> References: <206078.1621264018@warthog.procyon.org.uk> <6E4DE257-4220-4B5B-B3D0-B67C7BC69BB5@dilger.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, May 25, 2021 at 10:26:17PM +0100, 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. I just let xfs_scrub run FITRIM on Sundays at 4:30am. ;) --D