[mythtv-users] Fragmentation On Recording Disk?

Martijn Morriën dj.escay at gmail.com
Wed Apr 4 19:50:48 UTC 2007


On 4/4/07, catfish <catfish at halfdone.com> wrote:
>
> Michael MacLeod wrote:
> > root at sixball:~# xfs_db -r /dev/mythtv/mythmedia
> > xfs_db> frag
> > actual 3904, ideal 3191, fragmentation factor 18.26%
> > xfs_db> quit
> >
> > I just thought I'd share this with the list, and ask if anyone else has
> > encountered significant performance loss due to disk fragmentation? How
> > fragmented are your drives?
>
> Robert wrote:
> > mythbox ~ # xfs_db -r /dev/mapper/vg-mythtv
> > xfs_db> frag
> > actual 60667, ideal 67, fragmentation factor 99.89%
> > xfs_db>
> >
> > Hmm, that looks pretty bad.
>
>
> Very interesting, think it would effect JFS also? I can't seem to locate
> an equivalent tool for it.
>
>
On my 'Jarod Wilson' Fedora box which uses Jfs I can use filefrag:

[root at mythtv video]# filefrag -v /video/9_20060901222500_20060902011000.nuv
Checking /video/9_20060901222500_20060902011000.nuv
Filesystem type is: 3153464a
Filesystem cylinder groups is approximately 89128
Blocksize of file /video/9_20060901222500_20060902011000.nuv is 4096
File size of /video/9_20060901222500_20060902011000.nuv is 7249782490
(1769967 blocks)
First block: 23647088
Last block: 25417064
Discontinuity: Block 761811 is at 24408904 (was 24408898)
Discontinuity: Block 1518731 is at 25165825 (was 25165823)
Discontinuity: Block 1518734 is at 25165832 (was 25165827)
/video/9_20060901222500_20060902011000.nuv: 4 extents found

I interpret this info as 4 continuus blocks for a 7GB file which seems good.
I tested a few other files and all had a small amount of extents. The system
is now running about 16 months and I did not take any defragmentation
actions. I regularly record two shows at a time with a PVR500 and I see no
weird values.

You can also test multiple files like:

[root at mythtv video]# filefrag /video/*
/video/1001_20070403041300.mpg: 5 extents found
/video/1001_20070403041300.mpg.png: 1 extent found
/video/1011_20070401152300.mpg: 3 extents found
/video/1011_20070401152300.mpg.png: 1 extent found
/video/1069_20061111231036.mpg: 1 extent found
/video/1069_20061111231036.mpg.png: 1 extent found
/video/1070_20061111231041.mpg: 1 extent found
/video/1070_20061111231041.mpg.png: 1 extent found
..
..

or with the -v option to get more info

One program I could find is Fibmap from some research done about the
fragmentation in different filesystems, the site seems to be updated in 2004
for the last time....
http://www.informatik.uni-frankfurt.de/~loizides/reiserfs/fibmap.html#description
I did not test the program.

Martijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20070404/01bf318d/attachment.htm 


More information about the mythtv-users mailing list