[KLUG Members] Defrag'ing ext3 filesystems?

Adam Williams members@kalamazoolinux.org
02 Oct 2002 12:11:12 -0400


>Okay, all the usenet messages I've been reading about ext2/3 not needing
>to be defragmented are full of crap!

*I* didn't say that.  I'm of the opinion that Linux has outgrown ext2/3
and we need to leave the silly toy behind.

IBM - "After all, ext2 filesystems take a long time to exhibit signs of
fragmentation. However, I would argue that fragmentation is still a big
problem, because although ext2 does not get fragmented easily,
fragmentation is a one-way, cumulative process. That is, while ext2
fragments slowly, it cannot defragment itself. In other words, any
often-modified ext2 filesystem will gradually get more and more
fragmented, and thus slower. Even worse, there are no production-quality
ext2 filesystem defragmenting programs currently available. This means
that fragmentation is guaranteed to get worse over time, and the only
way to fix it is to wipe the filesystem clean, and restore all the
original files from a backup."

>Yesterday when I was downloading the ISO images for Redhat 8.0,
>I was running two downloads at once, saving to the same partition.
>This is sure to fragment the ISO images, but no problem, at
>least according to the messages I've been reading in usenet...

How long has this file system been around?

>When I tried to burn these images yesterday, I first thought my hard
>drive was going bad.  My (otherwise unloaded) system couldn't keep the
>CDR's buffer full, even after slowing it down to 8X.  (thank goodness
>for burnproof!).  And everything else (that used the hard drive) on my
>system slowed to a crawl.  And the CPU usage was still 90+% idle.
>My system, and the ISO images, are on a IBM Ultra Wide SCSI hard drive!
>Normally my system never breaks a sweat, or goes below 100% buffer full
>when burning at 12X.  But testing with cdrecord -dummy today showed the
>same behavior at 8X & 12X.
>I copied the ISO images over to an IDE drive on the same computer (took
>forever), and they burned them fine off the IDE drive, 100% buffer all
>the way.  I copied them back to the SCSI drive (much faster than the
>first copy), and they now burn fine from the original location.
>I've seen some defragment programs for ext2.  Does anyone know if they
>work on ext3?

You'd have to convert your ext3 back to ext2, defragment, and then
convert back to ext3.

But the defrag program has been pulled from the ext2/3 website. :(

>Adam:  Checking the KLUG mailing list archives, I saw you had a defrag
>program on your AWware CD of a couple years ago.  Has that been updated
>for ext3?  What is the URL for it?  I haven't been able to locate it.

http://www.rpmfind.net//linux/RPM/contrib/libc6/i386/defrag-0.73-5.i386.html

I haven't used it in awhile,  I don't know how much it will like newer
2.4.x kernerls.  It certainly knows nothing about ext3 filesystems.

Want to start making BS-Ware PRO again?