Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4746520pxj; Tue, 25 May 2021 15:40:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL3ptaOOy5SzjKvJrsKX3uRQxN6BRtU+j+N1VZg1KMSKnHzwh4TtgppSY81xDYsGIJYwKD X-Received: by 2002:a02:c73a:: with SMTP id h26mr33391034jao.95.1621982414289; Tue, 25 May 2021 15:40:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621982414; cv=none; d=google.com; s=arc-20160816; b=JVB22tKJGvZu5KpBPZo91GcddQWGo+SawBxVJ3ZhC7IyFd18sEi91DJd4azkQdI2XU mlombDk7P2qnk2hZuH6GNuiPN/cxoi32mO9zS75x6NYlytNGiA/5N10vr1VZqKv1q06i nax+R2InIK/nF7gKfkVanKXNyXWeBvkfitEFb/tyF9J4GzQd9Jp8YkILC6lAdgFN4+yl jQQad9FWPWZM1BgT2/+N2/1pPBIDxGkazKXi2D1ITy9qpdCgZQTVPOOpnIRk9Fpg5Qxk hxN4nRNhXawtRfW0zpgoqbX7JWdWrE1UAEaLRZfunfY0aeaqdVYnW+WwvXdAg5JG3dFi MCbw== 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=cYNzR6K3PIie0xGXngP89tD+HJUpDWKHnFmlSQ/Txdk=; b=AFJJsEjzY7DN52Y45BbzttaXM4H9G978uBCRBSoXs7C8BoJ9z1wdJPrgdNh2//ZCIG kQ94F7F/7ImQT0bhr8f3sfFDn0FAg9or8wCP4Un4xKN7E/fDgXFEYlGqN2qT2PpquWwI YyieI1sj8+iMmIBmSdkn/Vrh8BGBK74q2EAZJPosbdoNN30ZrH+oQBlOb18lDiD1V1VG HXY/bzUpN2OS3bLatlphy+qq7RppsXOoO6XBnzP3YxPEajt+bTEbp5NDfqVCMEho9zGG uDs1SbGeG0mpgTT0kOvbT9//BclhCl+DMJnc8w1WeJxpbmHzavOHIkA+H9Z3OZcBkDt+ J22Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Zdjlab78; 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 t3si17106221jaj.67.2021.05.25.15.40.01; Tue, 25 May 2021 15:40:14 -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=@infradead.org header.s=casper.20170209 header.b=Zdjlab78; 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 S233125AbhEYV2b (ORCPT + 99 others); Tue, 25 May 2021 17:28:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231739AbhEYV2b (ORCPT ); Tue, 25 May 2021 17:28:31 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DCD9C061574; Tue, 25 May 2021 14:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=cYNzR6K3PIie0xGXngP89tD+HJUpDWKHnFmlSQ/Txdk=; b=Zdjlab78a1pNCAT69XlYHdae+P 1og8tvKEDGIShobkaTEJQ6UnAuc+SWNYft47PGNjMC7oF56+sWx8Zxo2gcqeo8qMZ5OyVPU8Ej6em Hy3iBLURPqblP1D1iu5wAB4i6vQEhbWfXg8PYIJNYTnUU4fQJ024cZT6lKLUoL5eRYsNoYqbs4M6U dhqPkczBY65bXJrReQDOJp6wFwFwsz8fa5NJparemNjKVH9pcxiS16tVrDsVVliID6k7S4I05SEvC EITaphGXQuqgSM+ssPPgmfCyNZXH88xzaEHv+/rcitpgGJBSfHbOHZNhwTqc6OYUtn0kAxd8sg9Z0 NciHE5KQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lleZ8-003udz-0Z; Tue, 25 May 2021 21:26:27 +0000 Date: Tue, 25 May 2021 22:26:17 +0100 From: Matthew Wilcox To: Andreas Dilger 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 Subject: Re: How capacious and well-indexed are ext4, xfs and btrfs directories? Message-ID: 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 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.