On 4/4/07, <b class="gmail_sendername">catfish</b> &lt;<a href="mailto:catfish@halfdone.com">catfish@halfdone.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Michael MacLeod wrote:<br>&gt; root@sixball:~# xfs_db -r /dev/mythtv/mythmedia<br>&gt; xfs_db&gt; frag<br>&gt; actual 3904, ideal 3191, fragmentation factor 18.26%<br>&gt; xfs_db&gt; quit<br>&gt;<br>&gt; I just thought I&#39;d share this with the list, and ask if anyone else has
<br>&gt; encountered significant performance loss due to disk fragmentation? How<br>&gt; fragmented are your drives?<br><br>Robert wrote:<br>&gt; mythbox ~ # xfs_db -r /dev/mapper/vg-mythtv<br>&gt; xfs_db&gt; frag<br>&gt; actual 60667, ideal 67, fragmentation factor 
99.89%<br>&gt; xfs_db&gt;<br>&gt;<br>&gt; Hmm, that looks pretty bad.<br><br><br>Very interesting, think it would effect JFS also? I can&#39;t seem to locate<br>an equivalent tool for it.<br><br></blockquote></div><br>On my &#39;Jarod Wilson&#39; Fedora  box which uses Jfs I can use filefrag:
<br>

<br>

[root@mythtv video]# filefrag -v /video/9_20060901222500_20060902011000.nuv<br>

Checking /video/9_20060901222500_20060902011000.nuv<br>

Filesystem type is: 3153464a<br>

Filesystem cylinder groups is approximately 89128<br>

Blocksize of file /video/9_20060901222500_20060902011000.nuv is 4096<br>

File size of /video/9_20060901222500_20060902011000.nuv is 7249782490 (1769967 blocks)<br>

First block: 23647088<br>

Last block: 25417064<br>

Discontinuity: Block 761811 is at 24408904 (was 24408898)<br>

Discontinuity: Block 1518731 is at 25165825 (was 25165823)<br>

Discontinuity: Block 1518734 is at 25165832 (was 25165827)<br>

/video/9_20060901222500_20060902011000.nuv: 4 extents found<br>

<br>

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.<br>

<br>

You can also test multiple files like:<br>

<br>

[root@mythtv video]# filefrag /video/*<br>

/video/1001_20070403041300.mpg: 5 extents found<br>

/video/1001_20070403041300.mpg.png: 1 extent found<br>

/video/1011_20070401152300.mpg: 3 extents found<br>

/video/1011_20070401152300.mpg.png: 1 extent found<br>

/video/1069_20061111231036.mpg: 1 extent found<br>

/video/1069_20061111231036.mpg.png: 1 extent found<br>

/video/1070_20061111231041.mpg: 1 extent found<br>

/video/1070_20061111231041.mpg.png: 1 extent found<br>

..<br>

..<br>

<br>

or with the -v option to get more info<br>

<br>

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....<br>

<a href="http://www.informatik.uni-frankfurt.de/~loizides/reiserfs/fibmap.html#description">http://www.informatik.uni-frankfurt.de/~loizides/reiserfs/fibmap.html#description</a><br>

I did not test the program.<br>

<br>

Martijn<br>