All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ragnar Kjørstad" <reiserfs@ragnark.vestdata.no>
To: Russell Coker <russell@coker.com.au>
Cc: reiserfs-list@namesys.com
Subject: Re: Agressive selective pre-allocation
Date: Tue, 10 Dec 2002 08:58:45 +0100	[thread overview]
Message-ID: <20021210085845.K26400@vestdata.no> (raw)
In-Reply-To: <200212100826.36651.russell@coker.com.au>; from russell@coker.com.au on Tue, Dec 10, 2002 at 08:26:36AM +0100

On Tue, Dec 10, 2002 at 08:26:36AM +0100, Russell Coker wrote:
> Yes.  Or even files that grow rapidly.  Consider the case of an application 
> which creates 10 files and starts appending data to each of them in turn in 
> chunks of a few K (slapd does this).  Your file system will be 100% 
> fragmented if you don't do something smart about allocation.

allocate on flush should handle this pretty well, don't you think?
Unless the writes are syncrounous.

But yes, the same principle applies. Files that grow over time (large
number of independent writes) is probably more accurate than slow-growing 
files.

> > An alternative would be the possibility to tell the fs about the
> > properties of the files. Maybe an ioctl to notify the fs that for this
> > particular file the fs should allocate X blocks at the time? That would
> > ensure that the files only get limited fragmentation and performance
> > stays optimal.
> 
> Another possibility is that you have a file system created for a specific data 
> type.  When I create a file system for an LDAP directory I know ahead of time 
> that I will have a small number of large files that are all growing slowly.  
> An option to the mkfs and tunefs programs to set this would do for me (and 
> it's easy to implement and get included in the kernel).  If I could set my 
> LDAP partitions to have disk space allocation in chunks of 4M then I'd be 
> happy.

That would work very well on things like logs - and it's probably a lot easier
to do than pr-file allocation policy.

> > Does the metadata-format support blocks beeing allocated but not used
> > yet? Is it sufficient to add them to the extent-map, mark them free,
> > without changing the size of the file?
> 
> You shouldn't need anything in the meta-data if you just do it in allocation 
> algorithms, every time you are about to grow a file and you can't grow it 
> contiguously then you search for a large free region.

Hmm, so still only allocate 1 block, but do it at a location that has a larger
region available?

> > Personally I think fragmentation is one of the most serious
> > performance-problems for filesystems, and this could potentially help a
> > lot at least for the slow-growing files like logfiles and mboxes.
> 
> mbox's aren't an issue, if you have them then you probably don't care too much 
> about performance anyway.

I know some that do, because some old mail-clients don't support maildir.


-- 
Ragnar Kjørstad

  reply	other threads:[~2002-12-10  7:58 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 [this message]
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
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=20021210085845.K26400@vestdata.no \
    --to=reiserfs@ragnark.vestdata.no \
    --cc=reiserfs-list@namesys.com \
    --cc=russell@coker.com.au \
    /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.