linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: "Albert D. Cahalan" <acahalan@cs.uml.edu>
Cc: Mike Fedyk <mfedyk@matchmail.com>,
	lkml <linux-kernel@vger.kernel.org>,
	ext2-devel@lists.sourceforge.net
Subject: Re: [Ext2-devel] disk throughput
Date: Mon, 05 Nov 2001 00:04:04 -0800	[thread overview]
Message-ID: <3BE647F4.AD576FF2@zip.com.au> (raw)
In-Reply-To: <20011104193232.A16679@mikef-linux.matchmail.com> from "Mike Fedyk" at Nov 04, 2001 07:32:32 PM <200111050554.fA55swt273156@saturn.cs.uml.edu>

"Albert D. Cahalan" wrote:
> 
> Mike Fedyk writes:
> > On Sun, Nov 04, 2001 at 06:13:19PM -0800, Andrew Morton wrote:
> 
> >> All well and good, and still a WIP.  But by far the most dramatic
> >> speedups come from disabling ext2's policy of placing new directories
> >> in a different blockgroup from the parent:
> > [snip]
> >> A significant thing here is the improvement in read performance as well
> >> as writes.  All of the other speedup changes only affect writes.
> >>
> >> We are paying an extremely heavy price for placing directories in
> >> different block groups from their parent.  Why do we do this, and
> >> is it worth the cost?
> >
> > My God!  I'm no kernel hacker, but I would think the first thing
> > you would want to do is keep similar data (in this case similar
> > because of proximity in the dir tree) as close as possible to
> > reduce seeking...
> 
> By putting directories far apart, you leave room for regular
> files (added at some future time) to be packed close together.

OK, that's one possible reason.  Not sure I buy it though.  If
the files are created a few days after their parent directory
then the chance of their data or metadata being within device
readhead scope of any of the parent dir's blocks seems small?

> I'm sure your benchmark doesn't fill directories with files
> by adding a few files every day over a period of many months.
> Think about projects under your home directory though.

OK.  I'm not really aware of a suitable benchmark for that.
postmark only works in a single directory.  mongo hardly
touches the disk at all, (with 3/4 of a gig of RAM, anyway).

My original make-100,000-4k-files test creates the files
in a tree - each node has 10 leafs.  For a total of 11,110
directories and 100,000 files.  It originally did it 
in-order, so:

mkdir(00)
mkdir(00/00)
mkdir(00/00/00)
mkdir(00/00/00/00)
creat(00/00/00/00/00)
creat(00/00/00/00/01)
...
mkdir(00/00/00/01)

etc.

So I changed it to create the 11,110 directories, and then
to go back and create the 100,000 files.  This will ensure that the
file's data are not contiguous with their parent directory.

With the ialloc.c change, plus the other changes I mentioned
the time to create all these directories and files and then run
/bin/sync fell from 1:53 to 0:28.  Fourfold.

But the time to read the data was remarkable.  This is purely
due to the ialloc.c change.  The command was

	time (find . -type f | xargs cat > /dev/null)

stock 2.4.14-pre8:	6:32
with ialloc.c change:	0:30

And this was on an 8 gig fs.  On a 32 gig fs I'd expect to see
a fifteen-fold difference due to the additional block groups.

Can you suggest a better test?

-

  reply	other threads:[~2001-11-05  8:09 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-05  2:13 disk throughput Andrew Morton
2001-11-05  3:20 ` Mohammad A. Haque
2001-11-05  3:31   ` Andrew Morton
2001-11-05  3:32 ` [Ext2-devel] " Mike Fedyk
2001-11-05  3:45   ` Andrew Morton
2001-11-05  4:39     ` Mike Fedyk
2001-11-05  7:06     ` Jens Axboe
2001-11-05  7:14       ` Andrew Morton
2001-11-05  7:26         ` Jens Axboe
2001-11-05  7:14       ` Mike Fedyk
2001-11-05  7:18         ` Jens Axboe
2001-11-05  7:18       ` Jens Axboe
2001-11-05  9:14         ` Mike Fedyk
2001-11-05  9:20           ` Jens Axboe
2001-11-05  5:54   ` Albert D. Cahalan
2001-11-05  8:04     ` Andrew Morton [this message]
2001-11-05 12:28       ` Matthias Andree
2001-11-05 14:23       ` Alexander Viro
2001-11-05 22:22         ` Andrew Morton
2001-11-05 22:41           ` Andreas Dilger
2001-11-05 22:53             ` Andrew Morton
2001-11-08 15:28               ` Constantin Loizides
2001-11-05 23:14             ` Dan Hollis
2001-11-06 10:52           ` Daniel Phillips
2001-11-06 16:17           ` Jeremy Fitzhardinge
2001-11-08 15:24             ` Constantin Loizides
2001-11-08 16:46             ` Jeremy Fitzhardinge
2001-11-09  6:08               ` Andrew Morton
2001-11-09  8:49               ` Jeremy Fitzhardinge
2001-11-06 21:45           ` Stephen Tweedie
2001-11-05 20:16       ` Andreas Dilger
2001-11-05 20:28         ` m
2001-11-05 21:39           ` Andrew Morton
2001-11-05 22:59             ` Linus Torvalds
2001-11-05 23:36               ` Alexander Viro
2001-11-05 23:50                 ` Linus Torvalds
2001-11-06  0:03                   ` Linus Torvalds
2001-11-06  1:33                     ` Alexander Viro
2001-11-06  2:10                       ` Linus Torvalds
2001-11-06  3:02                         ` Alexander Viro
2001-11-06  8:39                           ` Alan Cox
2001-11-06  8:37                             ` Alexander Viro
2001-11-06  8:48                               ` Andrew Morton
2001-11-06  3:49                         ` Alexander Viro
2001-11-06  4:01                           ` Linus Torvalds
2001-11-06  4:21                             ` Alexander Viro
2001-11-06  5:01                               ` Linus Torvalds
2001-11-06  5:31                                 ` Andrew Morton
2001-11-06  5:48                                   ` Linus Torvalds
2001-11-06  7:34                                     ` Mike Castle
2001-11-06  7:10                                   ` Kai Henningsen
2001-11-09 22:35                       ` Riley Williams
2001-11-06  1:28                   ` Alexander Viro
2001-11-06  9:16                     ` Wojtek Pilorz
2001-11-06  9:58                       ` Alexander Viro
2001-11-08 12:51                   ` Pavel Machek
2001-11-06 21:48           ` Stephen Tweedie
2001-11-06 23:17             ` ext2/ialloc.c cleanup Alexander Viro
2001-11-07 19:34               ` [Ext2-devel] " Andreas Dilger
2001-11-07 20:02                 ` Alexander Viro
2001-11-08  2:06                   ` Andrew Morton
2001-11-08 20:45                     ` Andrew Morton
2001-11-08 22:16                       ` Alexander Viro
2001-11-08 22:43                         ` Andreas Dilger
2001-11-08 23:08                           ` Alexander Viro
2001-11-09  6:15                             ` Andrew Morton
2001-11-09  6:56                               ` Andreas Dilger
2001-11-09  7:09                                 ` Andrew Morton
2001-11-09  7:12                                 ` Alexander Viro
2001-11-09  7:18                                   ` Andrew Morton
2001-11-05  9:45     ` [Ext2-devel] disk throughput Alex Bligh - linux-kernel
2001-11-05  9:58       ` Alex Bligh - linux-kernel
2001-11-05  8:47 ` Jan Kara
2001-11-05  8:50   ` [Ext2-devel] " Mike Fedyk
2001-11-05  9:01     ` Jan Kara
2001-11-05 12:23 ` Matthias Andree
2001-11-05 22:39   ` Andrew Morton
2001-11-05 23:41     ` Matthias Andree
2001-11-12  6:04 [Ext2-devel] " Yan, Noah

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=3BE647F4.AD576FF2@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=acahalan@cs.uml.edu \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfedyk@matchmail.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 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).