Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4755979pxj; Tue, 25 May 2021 16:00:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYM1DgCQqiMOgXV0OJp3jLf8q6+rSceDUHzXowXohJQf98pccnZ1h4dea1N7hg9IqgQ4K2 X-Received: by 2002:aa7:cc98:: with SMTP id p24mr34959593edt.353.1621983616335; Tue, 25 May 2021 16:00:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621983616; cv=none; d=google.com; s=arc-20160816; b=aOMSnqwaRHR9QGTEGjLDbnydiVReF5Qcp0pMHpp02aW8T2mg0zrWu6ACX3Uaglhxte Yzmc3LdPJ0SCzSaAVWzRP2jKzlBf3zTDuxLkBw/ihFgDQxDBVKyWChDtXO9vy/lhFI19 ga+AfYztdk36pW9cGyFKNbwNWBPPrEjPbfTvfSA0beVnSZNO4J/LfU21xptZz01+ssbZ f9pchNfzH56e65qn/VhPSaHPQN5fc/wh7IJZp83+HK1y0Z2tMfVSfwwCx0XwRl5Ll1bm wcC2eaoTXh39VW9KFv2u2vz18pUdtqiUmglJszfT0GY78kd+7bKK+CneoudQxigjXt9j o/5w== 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=l/zz8gIKUJAfq7N6w0kinNxdpCsMqH6Y7iG9rePPfHE=; b=DUYBv0bwWL0t8LZ8xt254JQkm/yv5uJEHuQA3MzLL2TsIFiYr5hD/Xru1vdwfz9wvd NAgVd5TAfVS+4YG70KK457qqO5rfF3UXf0Rssb/Y6v9d7ydiuvRJRdV71FGumuGwPVgQ wartyKBWavgzm+csWanEmQb3AEgTHaxJ48sbdduXy7y3uVK+EflNk+Bu2odAyTTOsT9S 3dfNlGrsMaqgX/w1iObFzfCEIGgvVozPAOb2EOeebEFYlGO8AIeV/abBEiL12DxIyRDi gblG0I358AHZcVQm54IYYCxPwrH3fTyq4wGZ6kllkflEPGkwUf1N3Z7UDO6mxdHxm+OS WQcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tc+axs4g; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k26si19220794eds.205.2021.05.25.15.59.47; Tue, 25 May 2021 16:00:16 -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=@kernel.org header.s=k20201202 header.b=tc+axs4g; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232168AbhEYWPW (ORCPT + 99 others); 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