Self fragmentation? (Was: Re: Parallel Startup for KDE.)

Roger Larsson roger.larsson at norran.net
Fri Oct 3 02:02:21 CEST 2003


On Thursday 02 October 2003 23.19, Andrew Morton wrote:
> Roger Larsson <roger.larsson at norran.net> wrote:
> > 41-41: 12491592-12491592 (1)
> > 42-42: 12491596-12491596 (1)
> > 43-43: 12491598-12491598 (1)
> > 44-45: 12491601-12491602 (2)
> > 46-49: 12491605-12491608 (4)
> >
> > Ouch!
> >
> > Why is this happening?
>
> Your disk (or that blockgroup at least) is horridly fragmented.
>

I tested to do it in different directories, on the same disk.

> Run `dumpe2fs /dev/whatever' and take a look at the 'Free blocks' lists.
> If they are huge, you are fragmented.

Horrible...

>
> We don't really have a fix for that.  It's surprisingly bad for an ext2
> filesystem.

Can we be sure about that? Server use != KDE (konqueror, kmail),
KDE compilations running for days in background, ...

>
> I usually keep a spare partition around, do a `cp -a' and swizzle the
> mountpoints.
>

So I did a little experiment (took a tar copy too...)
# cp -a ~/.kde other_disk/roger.kde
# rm -r ~/.kde
# cp -a other_disk/roger.kde ~/.kde

And retested, kmailrc to uses two blocks. The 

Will ext2 prefere that all files in a directory end up in the same blockgroup?
How is data blocks pages reused?
What will happen over time with lots of small files, few big, files are 
rewritten (growing) by writing completely new file, rename...

/RogerL

-- 
Roger Larsson
Skellefteå
Sweden


More information about the Kde-optimize mailing list