I'm at 99% right now (30GB free) -- I'll free some space, test again every 5% and report back.

Interestingly, a dd if=/dev/zero of=fragtest bs=40k count=1;filefrag fragtest results in that file using 3 extents instead of 1 roughly every 10th-11th creation.

Just for reference, a fresh JFS on the same 7-disk RAID5/LVM partition gets 185MB/sec writes consistently.

Thanks for the help,

On 1/19/07, Dave Kleikamp <shaggy@linux.vnet.ibm.com> wrote:
On Fri, 2007-01-19 at 01:38 -0500, Jason Fisher wrote:
> I have a 1.6TB jfs partition (Linux) that is roughly a year old.  In
> this time, the write speed has managed to drop to 5MB/sec and it has
> become nearly unusable.  I mainly use the RAID for mythtv, but
> recently it has become too slow for capturing.
> filefrag reports some 3GB files with 90,000 extents next to 3GB files
> with 18 extents.  Many files with thousands of extents.
> I understand there are no defrag tools available for Linux, and I
> would rather not back the data up and restore as it's important, but
> just not important enough to warrant the time spent.
> Is there another way I can deal with these files?
> I copied a file with 3000 extents off the partition and onto a spare,
> deleted the original and copied the file back and ended up with 1100
> extents.  An improvement, but would this method ever get performance
> back to a usable level?

I'm not sure if this will make much of a difference.  Defragging the
existing files one at a time may not have much of an effect on the
remaining free space, so a new file being captured may be just as
fragmented as before.

> What if I were to fill the remaining space
> with dd after deleting the original/before copying it back?

I don't think this will do anything useful.

> Or should
> I concentrate on freeing up as much space as possible before copying
> any files to/from?

The more free space you have, the better.  I don't know how close to
full your disk is, but you may want to try to maintain a certain amount
of free space and see how that affects performance.  If you do find a
"sweet spot" such as having good performance when the disk is say 80%
full, I'd be interested to know that.  Hopefully that percentage isn't
too low.

> Thanks,
> Jason
David Kleikamp
IBM Linux Technology Center