[Ocfs2-tools-devel] [PATCH 4/4] Defrag the filesystem
Joel Becker
Joel.Becker at oracle.com
Mon Mar 22 21:05:36 PDT 2010
On Mon, Mar 22, 2010 at 08:55:02PM -0700, Joel Becker wrote:
> 1. Making files more contiguous. This means taking files of many small
> extents and making them consist of fewer, larger extents. This is
> good for performance.
> 2. Making the whole disk more contiguous. This means packing file data
> to one end of the disk so that free space is in large hunks. This is
> good for future allocation of unfragmented files.
This is offline defrag. You can think really big here. Imagine
this scheme:
Pass 3a: Pack all data to the end of the disk. Don't care how badly it
packs, because you're just doing this temporarily. Now the
entire front of the disk is empty except for block groups.
Pass 3b: Move data back to the front of the disk to create almost
completely contiguous files. Do it in ascending inode order so
the earliest data extents correspond to the earliest inodes.
Something like that might satisfy both type 1 and type 2 defrag.
Joel
--
"You must remember this:
A kiss is just a kiss,
A sigh is just a sigh.
The fundamental rules apply
As time goes by."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-tools-devel
mailing list