Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2717906pxj; Mon, 17 May 2021 08:12:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyd/G6FLAr3EO709K0nH3K/uNeberTPwAWfR5UGWCl1WyfsBmL42iIpmFy+Tra24ORCOTuX X-Received: by 2002:a17:906:ecf9:: with SMTP id qt25mr389177ejb.55.1621264326337; Mon, 17 May 2021 08:12:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621264326; cv=none; d=google.com; s=arc-20160816; b=EKBjYxA97HINFdI+qabUb8dcfNOjmlP7h9KeehLZtO45ixL8ELix4wZbAtWY4yYu0z y0jlTmpxVFSai2H8rns/L+I+ehEo6wxNumIrpU9Rt0YBC0mlyw4WzD7pA2Rz/Nh9pUXf Yb/1AubzS41ZZMIovOYOgxUCE6+i8pNJVcKfFCBKp1fitNn6f/euHUqSSWxZzBQzLD1L 5j782d1rC/B4pTxPEqN9bgCUh5f+2IGDMUAXQkxwZ5Lw+MFL/0Y+f9e4sF9zr0KLxHiD wAKpIRcWvHB7NVdSRRC4OACXo9KvHoD06fFgKpcWDzsRNF/V7tnWucUbS0UYxwgyC18Y D/Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:from:organization:dkim-signature; bh=I5rAv94XxstBbe41BltHMXkjh+gEB3rfy3QPuNUieqo=; b=NuQpr0P4hnx4gH8rJo7mQlLWMqce35blE+bTYqZq1w5BwIJa4PwAIwX+it9FwtmVNY kU1Lp8VRYJxac2D5f5j4g4nwF5SFo+HjVPb5tAIt8SY+mzrC8EL1DRpVrkQgGYvKpZFa 8K8p7nJ3AsfhXbaGo2YXAGRGydVDEO4y+N8UVxXL3UkrVVlJgpN17iuJyuPE988fEwP2 K+o38gnNL9kTKuxklNirfOz0xwbuES9+r8+rKGvQVcPwHUZVY862pcwqbtW7+6766R7d KE9JEBlHjuUEzIOhw+C3yeas38V8WqX42cuaGfEALK9R125Zfm0uXZF9nj2AH9/KEpk2 gFNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F1t8fETi; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id df25si5634260edb.200.2021.05.17.08.11.38; Mon, 17 May 2021 08:12:06 -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=@redhat.com header.s=mimecast20190719 header.b=F1t8fETi; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242445AbhEQPLT (ORCPT + 99 others); Mon, 17 May 2021 11:11:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33618 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242987AbhEQPI2 (ORCPT ); Mon, 17 May 2021 11:08:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621264031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=I5rAv94XxstBbe41BltHMXkjh+gEB3rfy3QPuNUieqo=; b=F1t8fETiFEM/n2WnF1zm3pU+khKpCFuBokIAg9b/FGlRXcxKhnEkiETGfo67Y+K7ZEPn60 WPZ2l1+1YGZkSgoEPaHwmbn6EcETcyhHWkiCw31FYAvYqfUlouHCcHeB9RAkfXcTd7Vqb6 7KMcQCN5dvtJrHC3qVKBCyZ6VxBo1nY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-5-tj8WPEpmMVO6J5tMs2USrQ-1; Mon, 17 May 2021 11:07:08 -0400 X-MC-Unique: tj8WPEpmMVO6J5tMs2USrQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3DA96107ACCD; Mon, 17 May 2021 15:07:05 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-112-217.rdu2.redhat.com [10.10.112.217]) by smtp.corp.redhat.com (Postfix) with ESMTP id E90135D6D7; Mon, 17 May 2021 15:06:59 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells To: "Theodore Ts'o" , Andreas Dilger , "Darrick J. Wong" , Chris Mason cc: dhowells@redhat.com, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org Subject: How capacious and well-indexed are ext4, xfs and btrfs directories? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <206077.1621264018.1@warthog.procyon.org.uk> Date: Mon, 17 May 2021 16:06:58 +0100 Message-ID: <206078.1621264018@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi, With filesystems like ext4, xfs and btrfs, what are the limits on directory capacity, and how well are they indexed? The reason I ask is that inside of cachefiles, I insert fanout directories inside index directories to divide up the space for ext2 to cope with the limits on directory sizes and that it did linear searches (IIRC). For some applications, I need to be able to cache over 1M entries (render farm) and even a kernel tree has over 100k. What I'd like to do is remove the fanout directories, so that for each logical "volume"[*] I have a single directory with all the files in it. But that means sticking massive amounts of entries into a single directory and hoping it (a) isn't too slow and (b) doesn't hit the capacity limit. David [*] What that means is netfs-dependent. For AFS it would be a single volume within a cell; for NFS, it would be a particular FSID on a server, for example. Kind of corresponds to a thing that gets its own superblock on the client.