All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ragnar Kjørstad" <reiserfs@ragnark.vestdata.no>
To: Hans Reiser <reiser@namesys.com>
Cc: reiserfs-list@namesys.com
Subject: Re: Agressive selective pre-allocation
Date: Sat, 14 Dec 2002 02:56:41 +0100	[thread overview]
Message-ID: <20021214025641.F2727@vestdata.no> (raw)
In-Reply-To: <3DF8A130.7070101@namesys.com>; from reiser@namesys.com on Thu, Dec 12, 2002 at 05:46:08PM +0300

On Thu, Dec 12, 2002 at 05:46:08PM +0300, Hans Reiser wrote:
> >Yes, maildir is not always faster.
> >
> >First problem is disk-layout. The way it works with reiserfs3.6 and
> >default hashes the inodes and files are written in different orders and
> >the disk does a lot of unneeded seeks. 
> >
> You mean the names are written in an order different from the stat data 
> and file bodies, and the stat data and file bodies have the same order.
> 
> This is because we sort filenames by filename, and  sort stat data and 
> file bodies by objectid which tends to be ordered by creation time.

Exactly.

> We should implement a plugin that sorts filenames by creation time, and 
> that will cause our performance to resemble ext2 more (meaning that for 
> large directories the performance will fall apart, but for small 
> directories there might be some advantage from not sorting by name). 

Yes, or you could do as I did in my maildir-specific hash - make a hash
that tends to resemble creation-order. For maildir this can be done
pretty easily as filenames can be predicted and actually contain
information about creation-order.

> I 
> think that sorting file bodies by filename would require a larger key, 
> so I hesitate at that, but maybe it would be interesting to explore also.

That would be _really_ interesting, but I don't understand exactly what
would be needed. 

Am I right to assume that there are actually several seperate entities
that are related to the allocation/ordering:
- the reiserfs-key idenitfying the inode
- tree-nodes that hold the allocation-information about the file
  (I guess extent-lists in reiserfs4)
- the blocks actually allocated for the data.

So both the choice of the inode-key and the allocation-policy for new
tree-nodes and data-blocks could affect file-ordering? Since the key is
generated from the hash that should already be in directory-entry-order,
but what about the other two?

Frankly last time I checked I found the way that directories and
allocation work not too well documented. Perhaps I just didn't look the
right places... Or maybe I must just be prepared to take the time to
read the source properly to understand this.


> >It is also important that readdir-order matches the ondisk layout, but
> >that is perhaps already the case?
> >
> If you copy a directory, then after the copy the readdir order matches 
> the ondisk layout.

Yes, that's what I do now when my maildirs get too slow. It makes a
huge difference.


-- 
Ragnar Kjørstad

  reply	other threads:[~2002-12-14  1:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-10  6:46 Agressive selective pre-allocation Ragnar Kjørstad
2002-12-10  7:26 ` Russell Coker
2002-12-10  7:58   ` Ragnar Kjørstad
2002-12-10 11:12   ` Stefan Fleiter
2002-12-12  8:47     ` Ragnar Kjørstad
2002-12-12 14:46       ` Hans Reiser
2002-12-14  1:56         ` Ragnar Kjørstad [this message]
2002-12-10 14:13 ` Hans Reiser
2002-12-14  2:06   ` Ragnar Kjørstad
2002-12-10 16:43 ` Bruce A. Mallett
2002-12-10 17:17   ` Anders Widman
2002-12-14  2:09   ` Ragnar Kjørstad

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=20021214025641.F2727@vestdata.no \
    --to=reiserfs@ragnark.vestdata.no \
    --cc=reiser@namesys.com \
    --cc=reiserfs-list@namesys.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.