[mythtv-users] Fragmentation On Recording Disk?

Tim Phipps mythtv-users at phipps-hutton.freeserve.co.uk
Wed Apr 4 08:36:13 UTC 2007


On Wednesday 4 April 2007 8:31 am, James Warden wrote:
> Are disks formatted with
> ext3 showing the same fragmentation factor ? And does one know the growth
> rate of this factor ? (what are the relevant variables : disk size ?
> technology ? file system ?)
>
Using filefrag on my current disk:
/myth/1028_20070223002400.mpg: 2977 extents found, perfection would be 14 
extents
/myth/1028_20070322002900.mpg: 1473 extents found, perfection would be 16 
extents
/myth/1032_20070220003400.mpg: 2566 extents found, perfection would be 11 
extents

I'm in the middle of upgrading my storage and here's what I get on the new 
disk:
/mnt/myth/1028_20070223002400.mpg: 30 extents found, perfection would be 14 
extents
/mnt/myth/1028_20070322002900.mpg: 33 extents found, perfection would be 16 
extents
/mnt/myth/1032_20070220003400.mpg: 22 extents found, perfection would be 11 
extents

Both disks are ext3, the files on the current disk were written by myth and 
then lossless transcoded and the filesystem is about a year old and MythTV 
runs with 1GB min free space. The new disk files were just copied with rsync 
and there's acres of space.

MythTV must be one of the worst applications for producing fragmented files. 
It fills up the disk and then continues to delete older files and write new 
ones while keeping the disk very close to full. The files are all different 
sizes so there's no practical file system on earth that can stop 
fragmentation happening. I can't think of a better way to stress test 
filesystem fragmentation.

If it's a problem then I guess you should keep more disk space free so at 
least there's a chance for new recordings to find some contiguous space.
How much free space is enough? Maybe 20 times the largest file? That's a lot 
of programmes to lose just in the hope of reducing fragmentation. I haven't 
noticed a problem with streaming but this is SD only with a separate BE/FE.

Anyone know of a defragger for ext3/2?

Cheers,
Tim.


More information about the mythtv-users mailing list