From: Masato Minda <minmin@jprs.co.jp>
To: Eric Sandeen <sandeen@redhat.com>, "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: How many files to create in one directory?
Date: Tue, 28 Jan 2014 11:53:08 +0900 [thread overview]
Message-ID: <52E71B94.4000406@jprs.co.jp> (raw)
In-Reply-To: <52E6B80D.7060807@redhat.com>
Eric-san, Ted-san;
Thank you very much. I am happy now.
On 2014/01/28 3:02, Eric Sandeen 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.
>
> There are (4096-32)/8 indices per block, or 508.
> There are 2 levels, so 508*508=258064 leaf blocks.
> The length of each record for 28 char names would be 32 bytes.
> So you can fit 4096/32 = 128 entries per leaf block.
> 258064 leaf blocks * 128 entries/bock is 33,032,192 entries.
I understand.
> I recently made a spreadsheet to calculate this.
> I'm not sure if I am doing google docs sharing and protection
> correctly, but this might work:
>
> https://docs.google.com/spreadsheet/ccc?key=0AtdHTZsZ8XoYdE1IUXlDb1RXQkdPM3F4YWpfNGhMbFE&usp=sharing#gid=0
Great! It is useful for us.
On 2014/01/28 4:39, Theodore Ts'o wrote:
>
> 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.
Of course, I know that issue. But we have already this directory.
$ \ls -f | wc
1933497 1933497 14968002
This is for mail archive. :-(
On 2014/01/28 4:48, Eric Sandeen wrote:
>
> Yep, that's the max possible, not the max useable. ;)
Yes, I wanted to know the limitation.
Again, Thank you very much.
Best Regards,
--
Masato minmin Minda <minmin@jprs.co.jp>
Japan Registry Services Co., Ltd. (JPRS)
next prev parent reply other threads:[~2014-01-28 2:53 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
2014-01-28 2:53 ` Masato Minda [this message]
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=52E71B94.4000406@jprs.co.jp \
--to=minmin@jprs.co.jp \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.