On Apr 26, 2007  21:29 +0200, Jan Kara wrote:
>   I've been lately playing with remapping ext2/ext3 blocks (especially how
> much it can give us in terms of speed of things like KDE start). For that
> I've written two simple tools (you can get them from
> ftp.suse.com/pub/people/jack/ext3remapper.tar.gz):
>   e2block2file to transform (preparsed) output from blktrace into a list
> of accessed files and offsets accessed
>   e2remapblocks to use output from e2block2file and remap blocks into big
> chunks in the order in which they were accessed.

Does it map the whole file contiguously, or does it interleave blocks of the
file in the order they are accessed?  I would hope that it maps the whole
file contiguously, and let readahead work properly to fetch the whole file.
Also, keeping the file contiguous avoids fragmentation later if that file is
updated, deleted, etc, and conflicts with allocator/defrag/etc.

>   (see README in the tools archive for more details)
> 
>   So far the tools (especially e2remapblocks ;) work on unmounted
> filesystem. The ultimate goal is to be able to do similar things for
> mounted filesystems but I wanted to see whether block remapping is worth it
> and what kernel interfaces would be useful for achieving the goal.

I'd prefer that such functionality be integrated with Takashi's online
defrag tool, since it needs virtually the same functionality.  For that
matter, this is also very similar to the block-mapped -> extents tool
from Aneesh.  It doesn't make sense to have so many separate tools for
users, especially if they start interfering with each other (i.e. defrag
undoes the remapping done by your tool).

>   BTW, the results for KDE startup are as follows:
> The root partition was about 4.8 GB with around 1 GB free. System has
> 1GB mem. All measurements (except for warmcache) were performed after
>   sync; echo 3 >/proc/sys/vm/drop_caches
> 
> Ordinary start: 19.2 20.3 19.5 19.8 19.3; avg. 19.62
> Start with all data cached: 7 7.6 7.3 7.1 7.1; avg. 7.22
> Start with fcache (see thread http://lkml.org/lkml/2006/5/15/46 for details
> on fcache):
>   11.3 11 10.3 10.8 10.6; avg. 10.8
> Start with blocks remapped with e2remapblocks:
>   13.5 15 13 14.5 14.5; avg. 14.1
> (after remapping, data was stored in 20 continguous extents on disk)



Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to