public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Masato Minda <minmin@jprs.co.jp>, linux-ext4@vger.kernel.org
Subject: Re: How many files to create in one directory?
Date: Mon, 27 Jan 2014 13:48:29 -0600	[thread overview]
Message-ID: <52E6B80D.7060807@redhat.com> (raw)
In-Reply-To: <20140127193950.GA20411@thunk.org>

On 1/27/14, 1:39 PM, Theodore Ts'o wrote:
>> It will depend on the length of the filenames.  But by my calculations,
>> for average 28-char filenames, it's closer to 30 million.
> 
> Note that there will be some very significant performance problems
> well before a directory gets that big.  For example, just simply doing
> a readdir + stat on all of the files in that directory (or a readdir +
> unlink, etc.) will very likely result in extremely unacceptable
> performance.

Yep, that's the max possible, not the max useable.  ;)

(Although, I'm not sure in practice what max useable looks like, TBH).

-Eric

> So if you can find some other way of avoiding allowing the file system
> that big (i.e., using a real database instead of trying to use a file
> system as a database, etc.), I'd strongly suggest that you consider
> those alternatives.
> 
> Regards,
> 
> 					- Ted
> 


  reply	other threads:[~2014-01-27 19:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-27  7:16 How many files to create in one directory? Masato Minda
2014-01-27 18:02 ` Eric Sandeen
2014-01-27 19:39   ` Theodore Ts'o
2014-01-27 19:48     ` Eric Sandeen [this message]
2014-01-28  2:53       ` Masato Minda
2014-01-28 21:02       ` Andreas Dilger

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=52E6B80D.7060807@redhat.com \
    --to=sandeen@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=minmin@jprs.co.jp \
    --cc=tytso@mit.edu \
    /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