All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bruce A. Mallett" <bam@NightStorm.com>
To: reiserfs-list@namesys.com
Subject: Re: Agressive selective pre-allocation
Date: Tue, 10 Dec 2002 11:43:02 -0500	[thread overview]
Message-ID: <3DF61996.8050001@NightStorm.com> (raw)
In-Reply-To: 20021210074600.J26400@vestdata.no

It seems to me that it would be better to have the file system keep 
track of this itself.  If the following is known about each file:
   original creation date
   current file size
   number of times extended
 
then it might be possible to compute a growth policy.  For example when 
extending a small file, just move and extend it.  As the file and 
extention frequencies increase then create larger new extents.

But the problem really is that apps don't actually "grow"these files but 
instead rebuilds them.  Thus the file system sees a request to open a 
new file and not to extend an existing one.  This would make tracking 
the above parameters way beyond difficult.



Ragnar Kjørstad wrote:

>Hi
>
>
>A lot of filesystems have files that grow slowly over time, and this is
>causing serious fragmentation, and thus performance-problems in some
>situations.
>
>A defragmentation-utility could potentially solve this, but maybe there
>is a better way?
>
>Some files, for instance MBOX-type mailboxes and logfiles, are known to
>the user/administrator to grow over time. It is possible to preallocate
>diskspace by creating large files with just zeroes in them, but this is
>not very flexible and requires the application to be awere.
>
>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.
>
>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?
>
>An even better way would be to mark the blocks as "preallocated" without
>assigning them to the file. This would allow preallocation without
>actually locking the blocks - so if the disk went full the allocator
>could override the preallocation and use them for other data. 
>
>Blocks are managed in extents in reiserfs4, right? So I assume there is
>an extent-list for free blocks? So maybe one could add an extra
>extent-list for "preallocated blocks", and the change the allocator to
>search that list if, and only if, it is appending to file on the
>previous block or if there are no blocks in the free-list?
>
>
>I have no time to try to implement this right now, but I just got the
>idea and figgured I should write it down while fresh in memory. Any
>reason why this wouldn't work? 
>
>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.
>
>
>
>  
>


  parent reply	other threads:[~2002-12-10 16:43 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
2002-12-10 14:13 ` Hans Reiser
2002-12-14  2:06   ` Ragnar Kjørstad
2002-12-10 16:43 ` Bruce A. Mallett [this message]
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=3DF61996.8050001@NightStorm.com \
    --to=bam@nightstorm.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.