public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@MIT.EDU>
To: Stefano Fedrigo <aleph@develer.com>
Cc: Bernie Innocenti <bernie@codewiz.org>,
	lkml <linux-kernel@vger.kernel.org>,
	David Woodhouse <dwmw2@infradead.org>,
	ext3-users@redhat.com, ext2-devel@lists.sourceforge.net
Subject: Re: ext3_dx_add_entry: Directory index full!
Date: Sun, 18 May 2008 20:49:55 -0400	[thread overview]
Message-ID: <20080519004955.GD8335@mit.edu> (raw)
In-Reply-To: <3A94CB82-6BF7-42DD-96DE-5B6018600077@develer.com>

On Mon, May 19, 2008 at 01:01:57AM +0200, Stefano Fedrigo wrote:
>
> So, if I understand correctly, with a 1024 bytes blocksize, dir_index, and 
> inode size of 128 byte, the maximum number of files in a directory is 
> 123008.  With 4k blocks this limit rises to 8,258,048 files?

It depends on the length of the directory entries, and how full the
various directory blocks end up getting (which is a function of the
directory names used and the per-filesystem hash seed).  But in
general, the maximum limit goes up as the cube of the blocksize.  So a
4k filesystem can store roughly 64 times as many files ; a filesystem
using 16k blocks (say, on a Power or IA64 architecture) will be able
to store roughly 4,096 as many files in a single directory.  (So
around 819 million files in a single directory, using the original
maildir example).

Seriously, though, past a certain point, if you really want to store
that many small datums, you should really consider a database....

     	  		    	   	  - Ted

      reply	other threads:[~2008-05-19  0:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-18 15:36 ext3_dx_add_entry: Directory index full! Bernie Innocenti
2008-05-18 15:38 ` Bernie Innocenti
2008-05-18 18:32   ` Jan Engelhardt
2008-05-18 21:04   ` Theodore Tso
2008-05-19  0:58     ` Bernie Innocenti
2008-05-18 15:39 ` David Woodhouse
2008-05-18 15:44   ` Bernie Innocenti
2008-05-18 16:24 ` Theodore Tso
2008-05-18 23:01   ` Stefano Fedrigo
2008-05-19  0:49     ` Theodore Tso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080519004955.GD8335@mit.edu \
    --to=tytso@mit.edu \
    --cc=aleph@develer.com \
    --cc=bernie@codewiz.org \
    --cc=dwmw2@infradead.org \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=ext3-users@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox