From: Chris Samuel <chris@csamuel.org>
To: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: btrfs and 1 billion small files
Date: Tue, 08 May 2012 16:31:02 +1000 [thread overview]
Message-ID: <4FA8BDA6.2070105@csamuel.org> (raw)
In-Reply-To: <9EC89864-505F-4821-90F9-389B8C65C4F2@gmail.com>
On 07/05/12 20:06, Boyd Waters wrote:
> Use a directory hierarchy. Even if the filesystem handles a
> flat structure effectively, userspace programs will choke on
> tens of thousands of files in a single directory. For example
> 'ls' will try to lexically sort its output (very slowly) unless
> given the command-line option not to do so.
In my experience it's not so much that lexical sorting that kills you
but the default -F option which gets set for users these days, that
results in ls doing an lstat() on every file to work out if it's an
executable, directory, symlink, etc to modify how it displays it to you.
For instance on one of our HPC systems here we've a user with over
200,000 files in one directory. It takes about 4 seconds for \ls
whereas \ls -F takes, well I can't tell you because it was still running
after 53 minutes (strace confirmed it was still lstat()ing) when I
killed it..
cheers,
Chris
--
Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC
next prev parent reply other threads:[~2012-05-08 6:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1913174825.1910.1336382310577.JavaMail.root@zimbra.interconnessioni.it>
2012-05-07 9:28 ` btrfs and 1 billion small files Alessio Focardi
2012-05-07 9:58 ` Hubert Kario
2012-05-07 10:06 ` Boyd Waters
2012-05-08 6:31 ` Chris Samuel [this message]
2012-05-07 10:55 ` Hugo Mills
2012-05-07 11:15 ` Alessio Focardi
2012-05-07 11:39 ` Hugo Mills
2012-05-07 12:19 ` Johannes Hirte
2012-05-07 11:05 ` vivo75
2012-05-08 16:46 ` Martin
2012-05-07 15:13 ` David Sterba
2012-05-08 12:31 ` Chris Mason
2012-05-08 16:51 ` Martin
2012-05-08 20:54 ` Chris Mason
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=4FA8BDA6.2070105@csamuel.org \
--to=chris@csamuel.org \
--cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).