From: Ted Ts'o <tytso@mit.edu>
To: Bernd Schubert <bernd.schubert@fastmail.fm>
Cc: Eric Sandeen <sandeen@redhat.com>,
Norbert Preining <preining@logic.at>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: Ext4 slow on links
Date: Fri, 22 Jun 2012 10:08:18 -0400 [thread overview]
Message-ID: <20120622140818.GA28155@thunk.org> (raw)
In-Reply-To: <4FE44089.2010609@fastmail.fm>
On Fri, Jun 22, 2012 at 11:53:13AM +0200, Bernd Schubert wrote:
> On 06/21/2012 06:05 AM, Eric Sandeen wrote:
> >On 6/20/12 9:28 PM, Norbert Preining wrote:
> >>Hi Eric,
> >>
> >
> >You could see if you could get this LD_PRELOAD working:
> >
> >http://git.kernel.org/?p=fs/ext2/e2fsprogs.git;a=blob_plain;f=contrib/spd_readdir.c
> >
>
> Hrmm, I need to look through that commit again, but on a first
> glance I cannot see code doing the sorting for ext3/ext4 only (e.g.
> by checking the fsid). So while I like the general approach, it will
> have the opposite effect for some file systems. I will report that
> back on the coreutils list.
>
> Thanks a lot for the pointer to the commit!
One warning about spd_readdir. It's not thread-safe, and I've noted
that some programs crash when they try using spd_readdir.so as a
pre-load. I've tried to fix some of the causes, and I think
thread-safety is the primary fix which is missing, but it's possible
that program which really care about telldir()/seekdir() behaviour as
it relates to readdir() and when files are added to a directory may
also end up getting surprised.
I wrote it primarily as a demonstration of how sorting by inode number
is a big win. It is *not* suitable for use in /etc/ld.so.preload!
If people want to try to make it safer, patches are accepted, but
ultimately it's better to fix this in the application; that way you
will get your performance gains no matter what OS you happen to be
running on, whether it's Linux, Solaris, AIX, OS X, etc.
- Ted
next prev parent reply other threads:[~2012-06-22 14:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-20 0:20 Ext4 slow on links Norbert Preining
2012-06-20 2:19 ` Ted Ts'o
2012-06-20 3:38 ` Norbert Preining
2012-06-20 3:57 ` Eric Sandeen
2012-06-20 4:01 ` Norbert Preining
2012-06-20 5:18 ` Norbert Preining
2012-06-20 14:07 ` Eric Sandeen
2012-06-21 2:28 ` Norbert Preining
2012-06-21 4:05 ` Eric Sandeen
2012-06-21 4:50 ` Norbert Preining
2012-06-21 5:18 ` Andreas Dilger
2012-06-21 6:55 ` Norbert Preining
2012-06-22 9:53 ` Bernd Schubert
2012-06-22 14:08 ` Ted Ts'o [this message]
2012-06-20 19:35 ` Eric Sandeen
2012-06-20 3:15 ` Eric Sandeen
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=20120622140818.GA28155@thunk.org \
--to=tytso@mit.edu \
--cc=bernd.schubert@fastmail.fm \
--cc=linux-ext4@vger.kernel.org \
--cc=preining@logic.at \
--cc=sandeen@redhat.com \
/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.